Removing subitems from datastore

I am able to use ‘remove’ as intended: removes the specified item/items from datastore

Is there a way to remove subitems? I can get to the sub items using:

$$("store").data.eachSubItem("xxx",function(obj){ console.log(obj.id)});

Is there a way to remove subitems?

When you are removing the top item, its child will be removed automatically.

If you want to remove child items only, you can use something like next

var store = $$("store")
store.data.eachChild("xxx", function(obj){ 
   this.remove(obj.id);
}, store);

Yes, I do want to remove children only

Thanks!