The data obtained by node.js cannot be parsed.

RT. I take the data out of the database, and the background console can read the data, but I can"t take out the parameters directly. I don"t know why. The data is in json format.

//
[ { column: "colFamily:content",
    timestamp: 152664103143,
    "$": "{"person":{"name":"wanger","birth":"1999"}}" } ]
    

values = values[0].$;
//    
{"person":{"name":"wanger","birth":"1999"}}

console.log(values.person)//undefined

above, even if you add JSON.stringfy or JSON.parse, the backend still gets undefined. I don"t know if there is any way to parse the data inside. Person,person.name, person.birth.

Mar.12,2021

//
[ { column: 'colFamily:content',
    timestamp: 152664103143,
    '$': '{"person":{"name":"wanger","birth":"1999"}}' } ]
    

values = values[0].$;
//  
//    
'{"person":{"name":"wanger","birth":"1999"}}' // 
//
values = JSON.parse(values) //

console.log(values.person)//undefined

is there a special symbol


1. Shaped like

 "{"item":"{"name":"xiaoming"}"}"
The json string of

can only be JSON.parse () as a js object
2. Put your console twice. The screenshot of log result is sent out

Menu