jso.parse( json.stringify) code example
Example 1: get value from JSON.stringify
var obj = '[{"availability_id":"109465","date":"2017-02-21","price":"430000"},{"availability_id":"109466","date":"2017-02-22","price":"430000"},{"availability_id":"109467","date":"2017-02-23","price":"430000"}]';
var stringify = JSON.parse(obj);
for (var i = 0; i < stringify.length; i++) {
console.log(stringify[i]['price']);
}
Example 2: json stringify and parse
var Jazzman = new Object();
Jazzman.altura = 1.85;
Jazzman.edad = 41;
Jazzman.colorOjos = "azul";
salidaJSON = JSON.stringify(Jazzman)
console.log(salidaJSON);
var jsonTexto = '{"color":"blanco","km":100000,"esNuevo":false,"rueda":{"marca":"desconocida","estado":"malo"}}';
var coche = JSON.parse(jsonTexto);
console.log(coche);