Write a script to remove multiple nested array
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 10:17 PM
We have a requirement in crisis map, where we have Feed table{sn_fam_feed} in that we have Impacted Area field to fetch latitude and longitude of data of multiple location which are impacted.
We have coordinates value with Multiple square brackets in between.
We want in this below format :
[[-85.1481213, 47.8240426], [-84.86081714, 47.89571687], [-84.24016987, 48.09787624], [-85.22199953, 48.28969123], [-86.09313426, 48.74553275], [-86.26650076, 48.580811], [-86.27593372, 48.57558458], [-86.28399277, 48.57457584], [-86.53093286, 48.29845467], [-86.13455479, 47.46541826], [-85.80906422, 47.30949464], [-84.91340571, 47.234691], [-85.1481213, 47.8240426]]
Can anyone help me with the script ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 10:31 PM
Hi, unfortunately the partial screenshot fails to clarify the format of the data involved.
Is it a string representing nested arrays, an object containing nested arrays, or just an array of nested arrays?
Perhaps you could share details of the data type\format so that the community can better understand and assist