Questions tagged [nested]

This tag relates to any of various nested entities or operations in programming.

0
votes
0answers
4 views

how to define nested array object in swagger 2.0

I try to define an object array in swagger as response: /product: get: operationId: api.product.read_all tags: - Product summary: Read the Products description: ...
0
votes
1answer
18 views

How to transform and modify (!) nested tags with XSLT?

Take this XML as an example... <list> <header> something </header> <main> <p> (1) nothing <b>special</b> at all. </p> <p&...
0
votes
1answer
22 views

Recursively add or remove class in a list jquery

I have a list with checkboxes that can indefinitely grow, i.e: <ul> <li class="tailor-children"> <input type="checkbox" class="tailorCheckbox" name="id" id="1_12" value="1_12" ...
1
vote
2answers
26 views

Flatten nested array in dictionary

I have a dictionary which has a nested array, say let data = {"date" : "01.01.2017", "foo":["mama", "papa", "sister", "brother"]}; Now, I need (want) to make the 'foo' array be part of the ...
0
votes
0answers
28 views

React: Nested state form DOM-like data

I know that in general it is not advisable to use nested state in React. However, I am wondering if for my use case this rule of thumb actually holds and if so why nesting in this case is a bad idea: ...
0
votes
1answer
15 views

Elasticsearch nested query and sorting

can somebody help me to understand what Elastic means by nested. In documentations https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_nested_sorting_examples is ...
0
votes
1answer
28 views

ansible nested loops with subelements

I'm struggling with a problem of nested loop where the first loop is on the key of an array element and the inner loop is on another variable. I have a set of hosts gathered by types, so I have a ...
0
votes
2answers
12 views

Issue with sequelize nested query - Sub query returns array object

const pEntries = await DB.models.pcPhoto.findAll({ raw : true, attributes : ['filename'], where: { eid : { $in: await DB.models.entrySettings.findAll({ attributes : ['...
0
votes
1answer
30 views

Using nested transactions in C# DataContext DNN

I am using this basic structure: using(IDataContext ctx = DataContext.Instance()) { try{ ctx.BeginTransaction(); ctx.Commit(); } catch(Exception) { ctx.RollbackTransaction(); ...
0
votes
2answers
32 views

GraphQL - Security - Protect nested data

Let's assume my app is an e-commerce. There are Users, Orders and Products. You need to be authenticated (with JWT Token) to have access to your user data, and your orders. This check is done in ...
-1
votes
1answer
16 views

Append element in nested list of class Python [duplicate]

this is my code: class Plant: def __init__(self,name): self.name = name class Garden: def __init__(self,name): self.name = name list_of_plants = [] list_of_gardens = [] ...
0
votes
1answer
30 views

How to query nested json with internal arrays in Spark on basis of equality check

I have a nested json structure loaded into a dataframe in spark. It contains several layers of arrays and I'm trying to figure out how to query this structure by values in the internal arrays. ...
2
votes
2answers
64 views

Specifying nested dictionary key in list of arguments

I have a function which iterates over a list of dicts, returning specified key-value pairs into a new list of dicts: data = [ {'user': {'login': 'foo1', 'id': 'bar2'}, 'body': 'Im not sure', '...
0
votes
3answers
22 views

JQUERY nested element selector/element

I want only author 2 in pink, how do I achieve this using .not($element)? i.e. I want only the second top element (author2) to be pink leaving behind the first top element(author1) on the list. Here ...
0
votes
1answer
22 views

Query for deeply nested array in mongodb

How do I query a deeply nested docs like show in the below image. Here columns is an array of unknown size. Each element in the column contains a record that is again an array. Each element of the ...
0
votes
0answers
10 views

Magento 1 Nesting level too deep - recursive dependency?

While uploading the products from Linnworks to Magento I get the error “Status Update error. Error : Product update was not successful. SKU: #1234. Product ID 1234. Nesting level too deep - recursive ...
0
votes
0answers
40 views

Nested for loops for user defined datatype

Hello I'm iterating through a user defined type of list. Is it possible to write this recursively ? Please help me rewrite this recursively. for (Tag tag : arpackages) { List<Tag&...
-3
votes
1answer
24 views

Trying to assign a Grade using IF in Excel

I'm trying to assign a PASS/FAIL grade to an item. The criteria are: If the bit has >=60, bits >=5, bites >=3, bite >=250, widgets=new the item will PASS otherwise if any of these are ...
1
vote
3answers
79 views

problem to create pattern like minesweeper with C#

first at all, i'm new at C#, so, I apologize if I ask something somewhat "so newbie". Well, here the thing: I'm trying to create a pattern, just like the game: Minesweeper 'cause i'm making a simple ...
1
vote
1answer
18 views

Adding the results of a for loop to the same key in a nested dictionary

I have a dictionary where it includes few sub-dictionaries in it. Each sub-dictionary has many keys. After running a for loop with an if condition too, the results are generated. I want to add ALL the ...
0
votes
4answers
43 views

Python3: list to nested dictionary, use first 12 list items as 2nd level keys

A subprocess.check_output of a bash script returns a query from a MySQL table as a string. split() gives me a list, that contains each table cell read from the left top as an item, like so: list = [...
1
vote
4answers
41 views

How i can append my data in nested Object?

let users = { 142201801: { name: "Pankaj Jaiswal", address: "Om sai rcm shopy , 400089", accountType: "Saving", deposits: 20000, withdraws: 15000, ...
0
votes
1answer
44 views

Separating a list in python into tuples [duplicate]

I have a nested list where 2 lists are included in the main list. The 2nd list has no items lets say A = [[3,4,5,1,6,],[]] I want to separate the 1st list into tuples in a way that it gives the ...
1
vote
0answers
44 views

Add complicated querys in rails

I have a complicated situation to make a query in Rails, The models look like: Route has_many Interests Route has_many Days Days has_many Points I have 2 query , One to search Routes by Interest....
0
votes
0answers
17 views

Rails 5.2: Active Admin Has_One Relations Error

I have model of course, every course has many units, every unit has many videos and has one quiz and finally every quiz has many questions. When I try to add new course or edit one, this is the error ...
1
vote
0answers
21 views

Nested subquery in sqlite3 for updating table record

I have a sqlite database having following schema Models:Table --This table maintain all models name and their current stock model_id IDENTITY NOT NULL, model_name VARCHAR (100) NOT NULL, ...
0
votes
1answer
17 views

SCSS: How to use two classes together with an ampersand?

I have some css rules to be applied for primary button, I did something like this: .my-btn { &--primary { padding: 10px; } } Now I want same rules to be applied for a primary button ...
1
vote
1answer
25 views

Correctly referencing a JSON in Python. Strings versus Integers and Nested items

Sample JSON file below { "destination_addresses" : [ "New York, NY, USA" ], "origin_addresses" : [ "Washington, DC, USA" ], "rows" : [ { "elements" : [ { ...
0
votes
0answers
62 views

Is there more simple/pythonic way to write this?

I want to make my code faster. And I am wondering if I can write this part of the code in a more pythonic way or a one-liner so it will be faster a bit. Fist I try to remove all empty values from a ...
0
votes
2answers
81 views

Python3: How to compare data of two dictionaries which is nested and dynamic in nature?

I am trying to find a way to compare two dictionaries without any library but the data is nested and keys are not ordered too.The data is dynamic in nature meaning the the keys in dictionary will ...
0
votes
3answers
40 views

How to mantain the original data after using the .filter() method?

This is my data : https://api.myjson.com/bins/r82tg I use the .filter() method to filter according to its name, var filteredData = data; var children = filteredData.children; filteredData....
0
votes
1answer
27 views

React - Update state of 2D array and fill it with random numbers using .map function and new Array.fill

I'm working on a John Conway's Game of Life app and I'm still learning React. Here is what I have so far. The game board is created using a 2D array in my App.js's state. I use new Array and the ....
0
votes
0answers
42 views

Remove the duplicated results in nested loop in R

This has been asked before, but without proper answers (or the answers that I could understand) as far as I know. How do I remove the duplicated results in the nested foreach loop if the length of the ...
3
votes
0answers
43 views

Insert object to nested array

I'm trying to insert an object to a nested array through the java api, but I get the following error MapperParsingException[object mapping for [X] tried to parse field [null] as object, but found a ...
0
votes
1answer
61 views

Calling a method from containing class from a method in the inner class

I have two classes: class My_package, which have methods that are just for sending stuff to the hardware and class Automation_algorithm, that perform all the algorithm that process my data. So what ...
0
votes
3answers
52 views

Sorting an array with nested tuples

I'm creating a leaderboard of top 5 scores that contains the following elements: Player Name Completion Time (how long it took to complete the game) Total Moves Date Stamp To do ...
1
vote
1answer
38 views

Generating a 2D array of numbers nested in a dictionary

I have a dictionary containing some keys as numbers. Each key has a set of values which contain numbers 'nested' within that particular key (this data has been pulled from a database). Some examples: ...
2
votes
1answer
41 views

Nested classes with Templates c++

I'm trying to implement methods that are in a nested class, that is inside a template, however I'm not able to do that. I'm new at cpp and would like to know if i can implement it in the way I code ...
-2
votes
5answers
41 views

print item from a list of nested dictionary in python3 [closed]

I have the data like this below, how can i find the tool_id that Kevin and Jeremy have in Python3. So I want result like : 4734238, 38374 4734233, 38374 Here is the list: assignment = [ { 'id': ...
1
vote
1answer
44 views

Looping thru a text file and trying to create a nested dictionary but the dictionary only prints last loop iteration not full loop nested together

I am trying to create a nested dictionary from some for loops. If my code is positioned like this: for figure in problem.figures: for object in problem.figures[figure].objects: ...
1
vote
3answers
15 views

ElasticSearch reindex nested field as new documents

I am currently changing my ElasticSearch schema. I previously had one type Product in my index with a nested field Product.users. And I now wants to get 2 different indices, one for Product, an other ...
-2
votes
1answer
35 views

How to import from a csv file already written as a nested tuple?

I have a file called 'test.csv'. You can see the first three lines in the attached test.csv.jpg. 'ID','NO_QUESTION','NO_RESPONSE','VALUE','MEMORY','AVAILABILITY','CLICK_EFFET' '34','01','01','1','1','...
0
votes
1answer
31 views

Creating an php array elements nested

I am trying to create an php array elements to be nested. For example: I have this array: array(3) { [0]=> string(9) "Example 1" [1]=> string(9) "Example 2" [2]=> string(9) "...
0
votes
1answer
16 views

Nested Function in a Class, Python

I am trying to have Nested function inside a class. Here is my coad class big(): def __init__(self): self.mas = "hello" def update(self): def output(self): ...
-5
votes
2answers
44 views

JavaScript loop through two arrays

There are two arrays: let cats = []; var biscuits = []; where I am adding elements with .push, for example I'll have: cats = ["Andy", "Bandy", "Candy", "Dandy"] biscuits = 14; What function to ...
-1
votes
2answers
29 views

AngularJs - Nested ng-repeat

I'm trying to iterate over a given JSONObject, which contains JSONArray in it and display it in html. So, here is the example: jsonData: { "category1": [ { "name": "Some ...
-3
votes
1answer
14 views

getting data from nested dictionary having multiple levels [closed]

I am new to python. This is a nested JSON file. I'm using python on Jupyter Notebook. I want to create a loop such that I can extract unitsWattSeconds and billAmount. I'm not able to iterate from ...
1
vote
1answer
21 views

Aurelia. Why is my nested repeat.for select not displaying data?

I have the below simple table displaying users and their roles. My nested repeat.for loops through a list of roles. My repeat.for="role of rolesData" does not display my data. Can you tell me why not? ...
-2
votes
0answers
28 views

Sublime Text 3, Node Element Nesting Tree HTML

I’m just wondering if there is a sublime text package which shows the div nesting in a tree like Google Dev Tools for example. I’d like to know what section i am working in without having to scroll ...
0
votes
0answers
16 views

Updating values in a nested dictionary is updating other values in the same level

print (d['merged']) # {'a': {'size': 'huge', 'angle': '0', 'above': 'b'}, 'b': {'size': 'huge', 'angle': '0', 'above': 'b'}} d['merged']['a']['angle'] = 700 print (d['merged']) # {'a': {'size': 'huge'...