結果 : convert nested object to array of objects javascript