I need to construct a json object like below
{ "Name":"Tom", "Hobbies":["Fishing","Reading"],"Cars": [{"Make":"Honda","Model":"Civic","Price":"25000"},{"Make":"Toyota","Model":"Camry","Price":"20000"}]
I am constructing this JSON object in a Java transformer. I am get this value [{"Make":"Honda","Model":"Civic","Price":"25000"},{"Make":"Toyota","Model":"Camry","Price":"20000"}] from DB query. But when I try to add this as JSON array in the transformer, it's throwing string can't be casted as JSON Array. Please let me know how to go about it.