rajeev kumar

rajeev kumar

  • 1.8k
  • 141
  • 8.1k

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);
 

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (2)