Slide 25
Slide 25 text
{
posts: [
{id: 1, title: 'Hello world', tag_ids: [11, 12]},
{id: 2, title: 'Goodbye', tag_ids: [11, 13]}
],
tags: [
{id: 11, name: 'announcements', post_ids: [1,2]},
{id: 12, name: 'happy', post_ids: [1]},
{id: 13, name: 'sad', post_ids: [2]}
]
}
JSON Many-to-Many Relationships
Saturday, February 16, 13