How do I differentiate and parse data from strings like this to json objects:
"[{"months": 12, "product": "car"}, {"months": "12", "product": "bike"}]"
"[{"months": 12, "product": "car"}]"
I need to know the count of json objects in string and get values based on that