// Separate keys and values.
const rowNames = [];
const ajaxElements = [];
- let rowName;
- for (rowName in rows) {
- if (rows.hasOwnProperty(rowName)) {
- rowNames.push(rowName);
- ajaxElements.push(rows[rowName]);
- }
- }
+ Object.keys(rows || {}).forEach((rowName) => {
+ rowNames.push(rowName);
+ ajaxElements.push(rows[rowName]);
+ });
if (rowNames.length) {
// Add a throbber next each of the ajaxElements.