This is the data saving in my rethinkdb database. and i save the data for addtowatchlater is array. I use ember.js for frontend and tornado for backend and database for rethinkdb.
{ "accesstoken": "ajflasjjfasjfjasfasdfjasjflsajjfas" ,
"addtowatchlater": [
{"beatdescription": "aa" , "beatname": "aa" , "categoryname": "DJ" , "filename": "asfasdfasdfasdfa" , "id": "423423454352342344545423434" , "price": "aa" , "soldout": "No" , "stamp": "1510244267000" , "userid": "816fbfe8-ea81-4198-98f0-5fb0db01e25e" },
{ "beatdescription": "aa" , "beatname": "aa" , "categoryname": "DJ" , "filename": "asfasdfasdfasdfa" , "id": "423423454352342344545423434" , "price": "aa" , "soldout": "No" , "stamp": "1510244267000" , "userid": "816fbfe8-ea81-4198-98f0-5fb0db01e25e"}] ,
"id": "et4545er5454354354354353" ,
"role": "user" ,
"status": "Active" , }
I want to Remove one json data from addtowatchlater array field. when i remove i want like this for example.
{ "accesstoken": "ajflasjjfasjfjasfasdfjasjflsajjfas" ,
"addtowatchlater": [
{ "beatdescription": "aa" , "beatname": "aa" , "categoryname": "DJ" , "filename": "asfasdfasdfasdfa" , "id": "423423454352342344545423434" , "price": "aa" , "soldout": "No" , "stamp": "1510244267000" , "userid": "816fbfe8-ea81-4198-98f0-5fb0db01e25e"}
] ,
"id": "et4545er5454354354354353" ,
"role": "user" ,
"status": "Active" , }
I want like this. I Don't know how to do. please help me. please help me how to do. Reall Thanks
Aucun commentaire:
Enregistrer un commentaire