dstore
dstore copied to clipboard
Allow idProperty to be defined as nested
I see that dstore is adding nested properties for queries (https://github.com/SitePen/dstore/commit/a822f92846024a8ac49254ada25e8ea63b62e5c3). It would be great if the idProperty could be nested as well. This would allow for the following:
new Memory({ idProperty: "referenceKey.id", data: response.expenditures })
To consume the following JSON:
{
"expenditures": [
{
"name": "foo",
"referenceKey": {
"id": 250004,
"version": 1
},
"auditInformation": {
"enteredBy": "billy",
"enteredDate": "2015-03-02T18:43:29"
},
"status": 1
},
{
"name": "bar",
"referenceKey": {
"id": 250001,
"version": 15
},
"auditInformation": {
"enteredBy": "tommy",
"enteredDate": "2015-03-15T10:23:47"
},
"status": 1
}
]
}