I am returning a json as shown below
{\"name\": \"\", \"skills\": \"\", \"jobtitel\": \"Entwickler\", \"res_linkedin\": \"GwebSearch\"}
I a
For getting key
var a = {"a":"1","b":"2"};
var keys = []
for(var k in a){
keys.push(k)
}
For getting value.
var a = {"a":"1","b":"2"};
var values = []
for(var k in a){
values.push(a[k]);
}
You can use the following solution to get a JSON key and value in JavaScript:
var dt = JSON.stringify(data).replace('[', '').replace(']', '');
if (dt) {
var result = jQuery.parseJSON(dt);
var val = result.YOUR_OBJECT_NAME;
}