I'm not sure if I've got the right wording in the title, but this is what I'm after:
I've got a 'designs' table and a 'variables' table. It is a one-to-many relationship such that a design has many variables.
How can I get the data as a single json object?