Skip to content

Tag: arrays

python print array inside the dictionary

I want to print ‘array’ inside the dictionary but my code gives me ‘each value’ of the array. for example, “array_ex” is a dictionary and has values like below with 12 rows for each array… and I want to get each row of the array as a result. However, my code returns e…

Mongo db array of images change schema

I have an array of images in mongodb and I am trying to change the schema of the array. Right now the images are stored like bellow And the final output I want is like bellow. How can I do this in mongosh? Is it easier to do this as a Python Array and then import back to mongodb? Thank