I have a json object as below which is a having some key value pairs where value is an array..
{
"bookSet": {
"book": ["book1", "book2", "book3"],
"title": ["title1", "title2"],
"author": ["author1"],
"publisher": ["publisher1"]
}
}
Now i want to parse this JSON and generate a JSON array out of this as below where each array is a PNC of each values in above json...
{
"eachBook": [{
"book": "book1",
"title": "title1",
"author": "author1",
"publisher": "publisher1"
},
{
"book": "book2",
"title": "title1",
"author": "author1",
"publisher": "publisher1"
}, {
"book": "book3",
"title": "title1",
"author": "author1",
"publisher": "publisher1"
}, {
"book": "book1",
"title": "title2",
"author": "author1",
"publisher": "publisher1"
}, {
"book": "book2",
"title": "title2",
"author": "author1",
"publisher": "publisher1"
}, {
"book": "book3",
"title": "title2",
"author": "author1",
"publisher": "publisher1"
}
]
}