I have checked in the links below for information on this question before posting https://www.youtube.com/watch?v=XRXjJRJ03_A Update field in exact element array in MongoDB
My Data
{
'_id': ObjectId('608b07c8f2cd2853333e1892'),
'DISNAME': '92bricks#4696',
'AVATAR': 'https://cdn.discordapp.com/avatars/306429381948211210/bcbd8bffe41170afedf18bebe030c675.webp?size=1024',
'IGN': [{
'Call Of Duty Mobile': 'BRICKS'
}],
'GAMES': ['Call Of Duty Mobile'],
'TEAMS': ['mcdonalds'],
'TITLES': ['PCG'],
'RANKED': [{
'1V1': [0, 0, 0]
}, {
'2V2': [0, 0, 0]
}, {
'3V3': [0, 0, 0]
}, {
'4V4': [0, 0, 0]
}, {
'5V5': [0, 0, 0]
}],
'NORMAL': [{
'1V1': [0, 0, 0]
}, {
'2V2': [0, 0, 0]
}, {
'3V3': [0, 0, 0]
}, {
'4V4': [0, 0, 0]
}, {
'5V5': [0, 0, 0]
}],
'TOURNAMENT_WINS': 0,
'TIMESTAMP': 'Thu Apr 29 12:21:53 2021'
}
I'm trying to update / increment NORMAL.$.1V1.1 (The middle item in the array of 0's)
I've tried {'$set': {'NORMAL.$.1V1.1': 1}} but it keeps throwing error full error: {'index': 0, 'code': 2, 'errmsg': 'The positional operator did not find the match needed from the query.'}
The video that I linked above says to build the logic in the syntax I posted above ({'$set': {'NORMAL.$.1V1.1': 1}}). Any ideas?