I have received a JSON in the following format:
var list=[{"Name":"arun","City":"xyx","CountryName":"KUWAIT"},"Name":"Amal","City":"abb","CountryName":"BAHRAIN"}];
This JSON is sent from my web server to my Android app as a String value. I need to convert it into the proper JSON format. The size of the string may vary depending on certain conditions. So far, I have only dealt with and converted JSON strings and arrays that were received in this format:
{"Android":[{"slno":"1","name":"abc","number1":"123","number2":"456"},{"slno":"2","name":"def","number1":"789","number2":"000"},{"slno":"3","name":"","number1":"234","number2":"567"},{"slno":"4","name":"ghi","number1":"890","number2":"345"}]}
However, I am unsure how to convert the initial JSON string received in my Android app. Can someone please assist me in converting it properly? How can I go about achieving this conversion within my app?