{"ScriptPreparationCode":"yourFlatObject = {\r\n \u0022height\u0022: \u0022172\u0022,\r\n \u0022mass\u0022: \u002277\u0022,\r\n \u0022hair_color\u0022: \u0022blond\u0022,\r\n \u0022skin_color\u0022: \u0022fair\u0022,\r\n \u0022eye_color\u0022: \u0022blue\u0022,\r\n \u0022birth_year\u0022: \u002219BBY\u0022,\r\n \u0022gender\u0022: \u0022male\u0022,\r\n \u0022created\u0022: \u00222021-11-07T15:18:53.215Z\u0022,\r\n \u0022edited\u0022: \u00222021-11-07T15:18:53.215Z\u0022,\r\n \u0022name\u0022: \u0022Luke Skywalker\u0022,\r\n \u0022homeworld\u0022: \u0022https://www.swapi.tech/api/planets/1\u0022,\r\n \u0022url\u0022: \u0022https://www.swapi.tech/api/people/1\u0022,\r\n \u00222height2\u0022: \u0022172\u0022,\r\n \u00222mass\u0022: \u002277\u0022,\r\n \u00222hair_color\u0022: \u0022blond\u0022,\r\n \u00222skin_color\u0022: \u0022fair\u0022,\r\n \u00222eye_color\u0022: \u0022blue\u0022,\r\n \u00222birth_year\u0022: \u002219BBY\u0022,\r\n \u00222gender\u0022: \u0022male\u0022,\r\n \u00222created\u0022: \u00222021-11-07T15:18:53.215Z\u0022,\r\n \u00222edited\u0022: \u00222021-11-07T15:18:53.215Z\u0022,\r\n \u00222name\u0022: \u0022Luke Skywalker\u0022,\r\n \u00222homeworld\u0022: \u0022https://www.swapi.tech/api/planets/1\u0022,\r\n \u00222url\u0022: \u0022https://www.swapi.tech/api/people/1\u0022\t\r\n}","TestCases":[{"Name":"1","Code":"\tlet html = \u0027\u0027;\r\n\tfor ( let item in yourFlatObject ) \r\n\t\tif (yourFlatObject[item] ) //!= null\r\n\t\t\thtml\u002B=\u0060\u003Cp\u003E${yourFlatObject[item]}\u003C/p\u003E\u0060;\r\n\thtml = html?\u0060\u003Cdiv class=\u0022info\u0022\u003E${html}\u003C/div\u003E\u0060:\u0027\u0027; ","IsDeferred":false},{"Name":"3","Code":"let html = \u0027\u0027;\r\nconst filteredData = Object.entries(yourFlatObject)\r\n .map(([key, value]) =\u003E ({ key, value }))\r\n .filter(({ value }) =\u003E value != null);\r\n\r\nif ( filteredData.length ) {\r\n\tfor ( let item in filteredData ) html\u002B=\u0060\u003Cp\u003E${filteredData[item]}\u003C/p\u003E\u0060;\r\n \thtml = \u0060\u003Cdiv class=\u0022info\u0022\u003E${html}\u003C/div\u003E\u0060;\r\n}","IsDeferred":false}]}