I'm using a google sheet spreadsheet as a database where I can work with some data.
I scrape a website that gives me JSON file and initially with RIGHT,LEFT,LEN I succeeded on extrapolating the exact data I need.
data was similar to this
[{"shopdata":"name"},{"shopdata":"price"}]
where shopdata was exactly the same so I should've worked a bit.
The Google sheet formula I found to extrapolate this was
=VALUE(LEFT(RIGHT($$CELL$$,LEN($$CELL$$)-FIND(",",$$CELL$$)-13),FIND("""",RIGHT($$CELL$$,LEN($$CELL$$)-FIND(",",$$CELL$$)-13))-1))
Probably was wrong but it was doing the job.
Now I'm trying to move everything on Google apps Script to speed up things. Does anyone have any advice? I converted the formula with this function
length = ("\"},{\"shopdata\":\"").length + brand.length -1
return LEFT(RIGHT(jsonstring,jsonstring.length-jsonstring.indexOf(brand)-length-1),(RIGHT(jsonstring,jsonstring.length-jsonstring.indexOf(brand)-length-1)).indexOf("\"")-1);
}```
I accept any kind of solution: I could treat the object as a JSON object and working it easily, I could do an enormous amount of thing to change how it works.
Now I'm working with about 1500+ data and it's becoming very very slow on simply finishing the function. What can i do?
EDIT:
Alright I provide you with some mock data

Clearly with 5 products I have no issues, but when products start to become 2000+ I have to wait that the Column C, Load every single function instance (In column C theres simply written "LowestNumber(B*)")
Is there a way in GAS to speed up this process?
I thought on treating every data as an huge array, elaborate it on hidden cells (AV, AZ, BA, BB etc) and then using formulas like "Sort" to sort them. But that doesn't eliminate the issue of the very slow loading