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

document list/map behaviour #237

Closed
mr-c opened this issue Jun 23, 2016 · 3 comments
Closed

document list/map behaviour #237

mr-c opened this issue Jun 23, 2016 · 3 comments
Assignees
Milestone

Comments

@mr-c
Copy link
Member

mr-c commented Jun 23, 2016

No description provided.

@mr-c mr-c added this to the Draft 4 milestone Jun 23, 2016
@ivanbatic
Copy link

Does this refer to an ability to define a hash map type for fields?

@mayacoda
Copy link

@ivanbatic, yes I think that what this is referring to. A list of "identifiable" items (each item has a unique id under the id field) can be written as a map of {id: item}.

Just a question, is the id field then removed from the item if the list is represented as a map?

For example, would the following array:

inputs: [
    {"id": "a", "prop": "value1"},
    {"id": "b", "prop": "value2"}
]

be represented as a map like this:

inputs: {
    "a": {"id": "a", "prop": "value1"},
    "b": {"id": "b", "prop": "value2"}
}

or like this?

inputs: {
    "a": {"prop": "value1"},
    "b": {"prop": "value2"}
}

@mr-c
Copy link
Member Author

mr-c commented Jun 26, 2016

The second way
Pe 24 iun. 2016 8:36 a.m., "Maya Nedeljkovich" notifications@github.com a
scris:

@ivanbatic https://github.com/ivanbatic, yes I think that what this is
referring to. A list of "identifiable" items (each item has a unique id
under the id field) can be written as a map of {id: item}.

Just a question, is the id field then removed from the item if the list is
represented as a map?

For example, would the following array:

inputs: [
{"id": "a", "prop": "value1"},
{"id": "b", "prop": "value2"}
]

be represented as a map like this:

inputs: {
"a": {"id": "a", "prop": "value1"},
"b": {"id": "b", "prop": "value2"}
}

or like this?

inputs: {
"a": {"prop": "value1"},
"b": {"prop": "value2"}
}


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#237 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABROCHoT6b0VxDwDj1UWya7bTSdtZFZbks5qO89RgaJpZM4I85zf
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants