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

how to skip attributes/key in JSON output #464

Open
xxxazxxx opened this issue Jun 11, 2013 · 0 comments
Open

how to skip attributes/key in JSON output #464

xxxazxxx opened this issue Jun 11, 2013 · 0 comments

Comments

@xxxazxxx
Copy link

Images Model contain id, file_name and description.

The usual output is :
{
"images": [
{
"id": 48660,
"file_name": "9e0f6.jpg",
"description": "View 1"
},
{
"id": 48665,
"file_name": "fd42f.jpg",
"description": "View 2"
},
{
"id": 48662,
"file_name": "477e8.jpg",
"description": "View 3"
}
]
}

How do I remove the attributes/keys and convert the values to an array?
{
"images":[
[
48660,
"9e0f6.jpg",
"View 1"
],
[
48665,
"fd42f.jpg",
"View 2"
],
[
48662,
"477e8.jpg",
"View 3"
]
]
}

Fomatted output : http://www.privatepaste.com/bb43a86891

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

1 participant