deepstreamIO / deepstream.io

deepstream.io server
https://deepstreamio.github.io
MIT License
7.13k stars 382 forks source link

Is there documented way to remove items from record object with path? #1131

Closed geohuz closed 1 year ago

geohuz commented 1 year ago

There is no document about manipulate the record object by using the path, execpt for set a property, I counldn't find how to remove property from map, remove item from array, append to the tail of the array (not by index) etc. Could someone help with the situation?

Thanks!

jaime-ez commented 1 year ago

Hi. read the docs please, the updated version is https://deepstreamio.github.io/

remove property from record: https://deepstreamio.github.io/docs/docs/client-js/datasync-record#erasepath-string append element at the end of the list: https://deepstreamio.github.io/docs/docs/client-js/datasync-list#addentry-entry-index- (just don give an index)) https://deepstreamio.github.io/docs/docs/client-js/datasync-list#removeentry-entry-index-

geohuz commented 1 year ago

@jaime-ez thanks for the reply, I think there is a question left, that is how to append item into nested array in a record? Should I always specify the index?

Thanks

jaime-ez commented 1 year ago

a record is just a JSON object. Do it as with any JSON object...