I'm trying to set up an object using a variable. Here's what I have:
var sortby = 'post_date';
var sort = { sortby : 'asc' };
but when I console.log(sort)
I get Object {sortby: "asc"}
How can I set the key of this object to the value of a variable?