Category "microdata"

How to Use If and else In google structured data Json

I am trying to make a custom blogger template and in this i am using google structured data Json how to use if, else in this json if data:post.firstImageUrl is

'aggregateRating' and 'review' for products that don't have any ratings or reviews

I am adding aggregateRating and review properties to my new product pages that don't have any ratings or reviews. How would I add them to my pages and have them