give roles off arguments in an array

hello! i am currently looking to give roles off a spreadsheet. i have used csvtojson to convert the spreadsheet to a json array (stored in jsonArray). i am looking to take the array and apply discord roles off the usernames and roles in it. below I have provided an example of what the array looks like
{"Discord":"Takumi#5946","Team":"Lenny Time","Individual":"78.27%","Individual?":"FALSE","% Calculator":"85.57%","Rank":"Premier"},
{"Discord":"Takumi#5946","Team":"Lenny Time","Individual":"78.27%","Individual?":"FALSE","% Calculator":"85.57%","Rank":"Premier"},
5 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ashie
ashieOP2y ago
i am unable to figure out how to take the different values from each field (Discord and Rank) and to apply roles off of them for each entry the actual code i have filters the array to just have Discord and Rank, like so
{ Discord: 'Takumi#5946', Rank: 'Premier' },
{ Discord: 'Takumi#5946', Rank: 'Premier' },
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ashie
ashieOP2y ago
how would i connect that to applying roles? because that's just the output of the values
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server