I have an array within my JSON file which looks as follows:
{
"commands": [
{
"user": "Rusty",
"user_id": "83738373",
"command_name": "TestCommand",
"command_reply": "TestReply"
}
]
}
and so on. I want to limit the amount of commands to a certain user (recognized by the user_id
) to 3 commands. I know I need to start by looping through each object but stuck at how to accomplish this part.