I am having a file having 100 lines  in below format.{ type: Feature, properties: { id:01,score:10000,Name: ABC, description: <html xmlns:fo=\http:\/\/www.w3.org\/1999\/XSL\/Format\ xmlns:msxsl=\urn:schemas-microsoft-com:xslt\>\n\n<head>\n\n<META http-equiv=\Content-Type\ content=\text\/html\>\n\n<meta http-equiv=\content-type\ content=\text\/html; charset=UTF-8\>\n\n<\/head>\n\n<body style=\margin:0px 0px 0px 0px;overflow:auto;background:#FFFFFF;\>\n\n<table style=\font-family:Arial,Verdana,Times;font-size:12px;text-align:left;width:100%;border-collapse:collapse;padding:3px 3px 3px 3px\>\n\n<tr style=\text-align:center;font-weight:bold;background:#9CBCE2\>\n\n<td>PASIR PANJANG 1<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>\n\n<table style=\font-family:Arial,Verdana,Times;font-size:12px;text-align:left;width:100%;border-spacing:0px; padding:3px 3px 3px 3px\>\n\n<tr>\n\n<td>SHAPE<\/td>\n\n<td>Polygon<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>Subzone Number<\/td>\n\n<td>13<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>Subzone Name<\/td>\n\n<td>ABC 1<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>Subzone Code<\/td>\n\n<td>QTSZ13<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>Central Area Indicator<\/td>\n\n<td>N<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>Planning Area Name<\/td>\n\n<td>QUEENSTOWN<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>Planning Area Code<\/td>\n\n<td>QT<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>Region Name<\/td>\n\n<td>CENTRAL REGION<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>Region Code<\/td>\n\n<td>CR<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>INC_CRC<\/td>\n\n<td>1F721290C421BFAB<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>FMEL_UPD_D<\/td>\n\n<td>12\/5\/2014 9:26:20 PM<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>X_ADDR<\/td>\n\n<td>22077.3383<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>Y_ADDR<\/td>\n\n<td>29893.7812<\/td>\n\n<\/tr>\n\n<tr bgcolor=\#D4E4F3\>\n\n<td>SHAPE_Length<\/td>\n\n<td>6571.323082<\/td>\n\n<\/tr>\n\n<tr>\n\n<td>SHAPE_Area<\/td>\n\n<td>1084792.320587<\/td>\n\n<\/tr>\n\n<\/table>\n\n<\/td>\n\n<\/tr>\n\n<\/table>\n\n<\/body>\n\n<\/html>\n\n}, geometry: { type: MultiPolygon, coordinates: [ [ [ [ 103.770389070495796, 1.292487855396017 ], [ 103.770414424305599, 1.292574882101212 ], [ 103.7701466034909, 1.29263278185594 ], [ 103.770073030489101, 1.292648696824341 ], [ 103.769991818022206, 1.292739600582147 ] ] ] ] } },.......From this I need to convert each line to 01,ABC,POLYGON((103.770389070495796, 1.292487855396017 ,  103.770414424305599, 1.292574882101212 ,  103.7701466034909, 1.29263278185594 ,  103.770073030489101, 1.292648696824341 ,  103.769991818022206, 1.292739600582147))and so on.Can it be done in awk or sed? Any help is appreciated
How to convert a JSON file into a different format
text processing;awk;sed;json
Another solution using jq:jq -j '.properties.id, ,,    .properties.Name, ,\POLYGON((,    (.geometry.coordinates | flatten | map(tostring) | join(,)), ))\\n' < file.jsonOutput:01,ABC,POLYGON((103.770389070496,1.29248785539602,103.770414424306,1.29257488210121,103.770146603491,1.29263278185594,103.770073030489,1.29264869682434,103.769991818022,1.29273960058215))Edit: fiddle 1, fiddle 2