node.js - Get key value from the list of JSON in NodeJS -


i receiving json object list of objects

result=[{"key1":"value1","key2":"value2"}]. 

i trying retrieve values list in nodejs. used json.stringify(result) failed.i have trying iterate list for(var key in result) still no luck prints each character key.

is facing such issue or have been through issue? please point me out way.

if result string then:

var obj = json.parse(result); var keys = object.keys(obj); (var = 0; < keys.length; i++) {   console.log(obj[keys[i]]); } 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -