I want to print a key: value pair from javascript object. I can have different keys in my array so cannot hardcode it to object[0].key1
var filters = [{\"user\"
You can access the value using array syntax
var filters = [{"user":"abc"},{"application":"xyz"}]; console.log(Object.keys(filters[0])[0]); // prints user var term = (Object.keys(filters[0])[0]); console.log(filters[0][term]);// prints abc