Hey guys. I have an array that has objects stored in it as strings:
[“{“fname”:”This”,”lname”:”Guy”,”state”:”AR”}{“fname”:”That”,”lname”:”Guy”,”state”:”CA”}”]
I’m trying to split the objects inside of this array so that I can access the fname, lname, and state keys and values. I thought that I’d need to split the array so I can then parse over the objects and use them like a regular object (example: Object[i].fname). However, when I try to split the array at the ‘}’, it tosses an error that “undefined is not a function”. How do I go through that array and get it so that the objects aren’t in a string and will be separated? Also, please don’t think I’m asking anyone to write code or do my job for me. I have code written up that I’m currently testing which I can post if it will help someone help me, but I wanted to keep this post as clean as I could without code dumping all over the place. Any tips I can get are always appreciated. Thanks for your time.