Organizational Research By

Surprising Reserch Topic

how to get json key and value in javascript?


 am returning a json as shown below

{"name": "", "johan": "", "titel": "tesrting title", "link_title": "link title "}

I am trying to get each element key and value:

..
}).done(function(data){
    alert(data['titel']);
});

asked Jun 3, 2015 in JAVASCRIPT by rajesh
0 votes
354 views



Related Hot Questions

1 Answer

0 votes
//By using jquery json parser

var obj = $.parseJSON('{"name": "", "skills": "", "jobtitel": "Entwickler", "res_linkedin": "GwebSearch"}');
alert(obj['jobtitel']);

//By using javasript json parser
var t = JSON.parse('{"name": "", "skills": "", "jobtitel": "Entwickler", "res_linkedin": "GwebSearch"}');
alert(t['jobtitel'])
answered Jun 3, 2015 by rajesh

...