I have two json objects like below:
{\"name\":[\"Karbonn Smart A12 Star (Black & Silver)\",\"Nokia 220 (Black)\",\"Karbonn Smart A52 Plus (Black & Go
you can find org.json here JSON-java
import java.util.ArrayList;
import java.util.List;
import org.json.*;
public class JsonTest
{
public String mergeJson(String name, String price)
{
JSONObject nameJ= new JSONObject(name);
JSONObject priceJ= new JSONObject(price);
JSONObject mobileJ = new JSONObject();
JSONArray names = nameJ.getJSONArray("name");
JSONArray prices = priceJ.getJSONArray("price");
JSONArray mobiles = new JSONArray();
if(names.length() == prices.length())
{
for(int i=0;i