Submitted on January 2, 2015 at 06:57 PM

Section 1 (JavaScript)

// Current:
[
    {
        "model": "foo",
        "fields": {
            "name": "bar",
        }
    },
    ...
]

[
    {
        "model": "abc",
        "fields": {
            "name": "xyz",
            "foreignKeyToFoo": ["bar"]
        }
    }
    ...
]

// What I want:

[
    {
        "model": "foo",
        "fields": {
            "name": "bar",
        },
        "abc": [
            {
                "name": "xyz"
            },
            ...
        ]
    },
    ...
]