Iterate Key Value Array Javascript Append Element