C
C#7mo ago
Ewan

✅ how to take out items in a string into an array and making it work for other strings?

Ive been trying to take out the topping items and put them in an array from this line of string but im not sure how. I need to make a for loop and use .split or .substring or something im not too sure. Also, the code needs to work for different strings like this where there are more or less toppings, not just this string. help please!
No description
2 Replies
Angius
Angius7mo ago
Yep, splitting is a good idea Would be easier if the string was valid JSON, but as it is you can use splitting fairly easily Another idea is to write a custom parser
Ewan
EwanOP7mo ago
oh yeah nvm i just found out how to do it the .replace() is a savior thanks haha
Want results from more Discord servers?
Add your server