Questions tagged [unwind]

26 questions
3
votes
1 answer

How can I filter sub-documents from MongoDB with SpringBoot?

I have documents in a collection such as : { "login":"xxx", "someAttribute":"someValue", "subDocs":[ { "data": "val1", "subDocNestedArray":["WWW","AAAA"] }, { "data": "val2", "subDocNestedArray":["AAAA"] …
pibou
  • 51
  • 5
3
votes
1 answer

Segue/unwind repeatedly causing memory to keep increasing when video is loaded

I am writing a very simply app that has two View Controllers - FirstVC and SecondVC. On the FirstVC, I load a video (apples.mp4) which loops forever in the background (of my view). The video loading is done by the displayBackgroundVideo() function…
atrdeveloper
  • 137
  • 8
2
votes
2 answers

Unwind 3 arrays in MongoDB

MongoDB collection data with multiple arrays: { "_id": ObjectId("61aa6bf1742b00f59b894eb7"), "first": ["abc", "def", "ghi"], "last": ["rst", "uvw", "xyz"], "numb": ["12", "34", "56"] } Expected output where the data in the arrays…
1
vote
1 answer

Unwind different arrays in mongodb

Let's assume that I have a MongoDB collection with documents like these: { id: "xyz", prop1: "val1", prop2: "val2", array1: [ {arr1objid:"1"}, {arr1objid:"2"}, ], array2: [ {arr2objid:"a"}, …
S-Wing
  • 485
  • 6
  • 25
1
vote
0 answers

aggregation lookup by unwind is not working in mongodb

Actually, I'm having two schemas named Users and Courses. I stored all the users id that are mapped to course. Now i want to access all the user data based on user id which is stored in the courses table using aggregate, lookup and unwind. So,…
1
vote
4 answers

How To Count Values Inside Deeply Nested Array Of Objects in Mongodb Aggregation

I want to sum of values inside array of objects which have another array of objects. In my case; how can I count 'url' values in all documents inside 'urls' array under 'iocs' array; Mongo playground: open Here is document example; [ { "_id":…
Mbay
  • 75
  • 1
  • 6
1
vote
1 answer

How to retrieve whole data from $$ROOT after using unwind in MongoDB aggregation

I am trying to group data using mongodb aggregation method. I have no idea about the DB structure but email column will be there. In DB email column can be saved with any name like gmail, mail, etc. For example test DB is shown below. How to group…
anu
  • 21
  • 4
1
vote
0 answers

Unwind segue from navigation bar back button

I am trying to update a view's data on one view controller enclosed inside a stack view after hitting the navigation button back to it from another view controller. I have seen other threads describing how to check if the back button had been…
djdannel
  • 11
  • 1
1
vote
0 answers

MongoDB count nested key values once, if they are unique

i try to count nested documents inside a findOne operation in golang. idForDB := "621101966rf42c24a8f41b87" ctx, cancel := context.WithTimeout(context.Background(), time.Second * 20) defer cancel() options := options.FindOneOptions{ …
Markus Bach
  • 763
  • 1
  • 8
  • 24
1
vote
2 answers

Create relationship between nodes created from UNWIND list

I am passing into a Cypher query a List>, which I am using to create a series of nodes based on the key-value pairs contained in the Map. I now want to be able to link those nodes together, in the order they were…
simonalexander2005
  • 4,338
  • 4
  • 48
  • 92
1
vote
1 answer

MongoDB $lookup function replace whole document

I'm currently running a query that looks like this: courses = await Enrollment.aggregate([ { $match: { userId: userId } }, { $lookup: { from: 'courses', …
Andrew
  • 240
  • 1
  • 3
  • 13
1
vote
1 answer

In Neo4j Cypher, How to iterate using LOAD CSV, UNWIND/FOREACH and WITH clauses?

In Neo4j, using Cypher, I want to run the below query for numbers 1 through 14 (i.e., quantity1 to quantity14): LOAD CSV WITH HEADERS FROM '' AS row WITH row WHERE row.quantity1 IS NOT NULL MATCH (m:main {main_id: row.main}) MERGE…
kumarais
  • 11
  • 1
1
vote
1 answer

Reply head informations and add extract array to same result

someone colud please help me with this situation? I have this fake JSON... [ { "user": { "type": "PF", "code": 12345, "Name": "Darth Vader", "currency": "BRL", "status": "SINGLE", "localization": "NABOO", …
1
vote
0 answers

Problem returning array of strings instead of BsonDocument Mongodb c# driver Unwind

I have got a class called Contact which has a field named Numbers and Numbers is a list of strings. I want to return a list containing all numbers in matched documents only. but it gives me an array of BsonDocuments. I need Just a List of…
Daviid
  • 35
  • 5
0
votes
0 answers

What are the corresponding registers in aarch64 compared with x86_64?

I have a piece of code that performs unwind in x86_64, I am trying to step forward in c code like this: frame->rsp = frame->rbp+2; frame->rip = *(frame->rbp+1); frame->rbp = *frame->rbp; However, I don't know if this is correct in the situation of…
shenmufeng
  • 67
  • 1
  • 7
1
2