var labels = { post: 'Batman', name: 'Bruce Wayne', city: 'Gotham' }, print = { city: '...', name: '...' }; for (var key in labels) { if (print[key]) $('#print').append('<p><b>'+key+'</b>: '+labels[key]+'</p>'); };