rajeev kumar

rajeev kumar

  • NA
  • 141
  • 14.3k

I want string like this in javascript

Jan 18 2017 11:23 PM
i have json string array like this 
var stringold= [
{"aptid":1,"businesname":"skulink","ownrnm":"rajiv"},
{"aptid":2,"businesname":"prodegios","ownrnm":"sanjeev"}
]
**// but i want like this**
var newstring=[
["aptid":1,"businesname":"skulink","ownrnm":"rajiv"],
["aptid":2,"businesname":"prodegios","ownrnm":"sanjeev"]
]
 
What I have tried:
 
var jsonm = msg.d;
var jsonm = $.parseJSON(msg.d);
//var objectStringArray = (new Function("return [" + jsonm + "];")());
var test = JSON.parse(jsonm);
 

Answers (2)