Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow idProperty to be defined as nested #116

Open
schallm opened this issue Apr 8, 2015 · 0 comments
Open

Allow idProperty to be defined as nested #116

schallm opened this issue Apr 8, 2015 · 0 comments

Comments

@schallm
Copy link

schallm commented Apr 8, 2015

I see that dstore is adding nested properties for queries (a822f92). 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
       }
     ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants