Once again I need your help I use airtable as a database to store car accidents. In the database I store date, address and json strings. When app opens json strings are received from airtable and markers are visible on Google map to show where an accident occured . When I have identical strings I find duplicates and count how many times appear in the database.
After that I want to change the color in the marker to represent that number for a example if a json string is present more than 5 times change color to orange and if it present more than 10 times to red.
My thought was to something like in the following picture for each item in list (json from airtable) to create two lists one with unique_json and one with unique_count but it doesn’t work . I get four unique json strings and each count is 2, 2, 2 ,1.
Then I try to compare the value from each count and replace the color in json string but it doesn’t work as intended . Any suggestions ? Where do I do wrong ?
Thank in advance and Happy New Year !