Created
December 5, 2013 16:33
-
-
Save dkamioka/7808612 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json.root do | |
json.array! @root_array do |json, item| | |
json.id item[:id] | |
json.array!(item.nested_array) do |json, nested_item| | |
json.nid nested_item.nid | |
end | |
end | |
end |
We tried Google, StackOverflow and beware! Even the documentation! Do you know how to help?
{
"root": [
{
"id": 1
"nested_array": [
{
"nid": 11
},
{
"nid": 12
}
]
},
{
"id": 2
"nested_array": [
{
"nid": 21
},
{
"nid": 22
}
]
}
]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Goog.....:)