Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Why convert a collection of objects to an object with numeric keys? #50

Closed
baig opened this issue Dec 10, 2015 · 1 comment
Closed

Why convert a collection of objects to an object with numeric keys? #50

baig opened this issue Dec 10, 2015 · 1 comment

Comments

@baig
Copy link

baig commented Dec 10, 2015

RAML parser parses this structure:

resourceTypes:
    - readOnlyCollection:
          description: Collection of available <<resourcePathName>> in Jukebox.
          get:
          ⋮
    - collection:
          description: Collection of available <<resourcePathName>> in Jukebox.
          get:
          ⋮

to this:

{
    resourceTypes:  {
        '0': { readOnlyCollection: [Object] },
        '1': { collection: [Object] },
        '2': { 'collection-item': [Object] }
    }
}

instead of this:

{
    resourceTypes:  [
        { readOnlyCollection: [Object] },
        { collection: [Object] },
        { 'collection-item': [Object] }
    ]
}

Why?

@baig
Copy link
Author

baig commented Dec 10, 2015

My bad. This is not the case. Indeed RAML parser does convert it to a collection of objects. Ignore this please. I apologize for any inconvenience.

@baig baig closed this as completed Dec 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant