How to modify complex string format by vue.js or node.js

RT. I read the data from the database, the original storage is json, but after reading from the database, there will be the database column name and timestamp, do not know how to delete. The data you want to get are as follows:

{
  "person": {
    "name": "wanger",
    "birth": "1999"
  }
}

actual data:

[{
    "column":"col:model_contents",
    "timestamp":1525853596193,
    "$":"{"person":{"name":"wanger","birth":"1999"}}"}]

how to peel off the unwanted ones.

Mar.10,2021

`
var source_data = [{

"column":"col:model_contents",
"timestamp":1525853596193,
"$":"{"person":{"name":"wanger","birth":"1999"}}"}]

var target_data = data [0]. $
`


this does not need to be split, because it does not affect your business logic. JSON.parse can directly fetch data
if it affects business logic, then there is a problem with the data passed by your backend

.
Menu