Questions tagged [dot-notation]

18 questions
2
votes
0 answers

How to read the value of list/dict objects using a dot-notation string?

Given this bunch of python objects (lists and dicts): d = [ { 'props': { 'columns': [ { 'field': 'Hello' } ] } } ] How would I use a string using dot-notation to return the…
njminchin
  • 408
  • 3
  • 13
2
votes
0 answers

Principles behind DOM element direct selection (dot notation)

Background info: I’m studying JavaScript, currently trying to understand DOM interactions, specifically direct selection (dot notation). It is worth noting that i’m a very theoretical learner and need to understand the principles in order to…
4get
  • 21
  • 1
2
votes
5 answers

Convert flat array with dot-delimited keys to nested array

I am trying to created nested array from flat based on its keys. Also format of keys in original array can be changed if it will simplify task. From : $arr = [ 'player.name' => 'Joe', 'player.lastName' => 'Snow', 'team.name'…
Alex Kneller
  • 413
  • 4
  • 15
1
vote
0 answers

Spyder Console: Autocompletion duplicates code while defining a new variable

I recently experience an annoying bug with TAB autocompletion in the Spyder IPython console: when I define a new variable that is dependent on a property called with dot notation, autocompleting the property duplicates all previous code from the…
Pabolwenzt
  • 11
  • 2
1
vote
1 answer

Is there a specific word for multiple dot notations on an element?

What would you call using multiple dot notation's to a variable? i.e: e.target.style.textDecoration I've tried to Google search for an answer but not sure exactly how to word the question. Plus I would like to get familiar with asking questions on…
1
vote
1 answer

Typescript error when using brackets and replace function in VueJS

I'm quite new to typescript language, but eager to learn it. I have a SPA-Wordpress project as a hobby on my hands, I'm coding in Vite (VueJS), and I can't figure out the right syntax form to go from dot notation to bracket.
Larry
  • 55
  • 1
  • 6
1
vote
0 answers

chrome console accessing dot notation square brackets

Hi I have used dot notation in chrome console multiple times. My first time coming across square brackets in the console. I have no idea how to access that data. Anyone familiar on how to access this dot notation wise. I have tried open.[[Scopes]]…
Vzupo
  • 1,388
  • 1
  • 15
  • 34
0
votes
0 answers

Wrap components inside a wrapper component conditionally in reactjs

I am working on a generic component which has some sub-components that are wrapped into the main component like this:
The main point here is that I want to prevent any…
Saif
  • 249
  • 5
  • 15
0
votes
1 answer

Accessing An Object Property Wrapped in an Array

This one is a two parter. Firstly I have a form with a bunch of values defaultly assigned and I'm displaying a chart.js chart. Ideally I would like the user to be able to submit those values and then update the values in the chart by calling a…
user21297781
0
votes
0 answers

How do I use Laravel array dot notation without changing multidimensional sequencial arrays

I'm currently attempting to create a dot notation multidimensional array except when the array is sequential instead of associative, so for example: Array ( [cars] => Array ( [specs] => Array ( …
0
votes
1 answer

Python class __call__ method and dot notation

My Goal is to use dot notation to select strings from dictionarys using the SimpleNamespace modeule while having the ability to change which dictionary to use. To do this i have tried modifying the class __call__ method to change the output based on…
0
votes
0 answers

Use JSON dot notation to access homogeneous nested JSON elements within a list

I have a machine-generated JSON of the following form: { "detail": { "container": { "environment" : [ {'Name': 'ENV_VAR_A', 'Value': 'MyValA'}, {'Name': 'ENV_VAR_B', 'Value': 'MyValB'}, {'Name': 'ENV_VAR_C',…
jsmall
  • 3
  • 2
0
votes
0 answers

Simplest way to not include a key:value pair if there is no value

I have been utilising ? a lot recently when writing object key:value pairs e.g: const myData = { name: data.hasValue?.name } However I have some instances where I can't use ? to check for definition. For example when interrogating a node on…
user1486133
  • 1,309
  • 3
  • 19
  • 37
0
votes
0 answers

freeCodeCamp Object Lookup challenge need clarification on Dot Notation vs Bracket Notation

I solved the one freeCodeCamp challenge which asked you to turn a Switch/Case statement into an object and access the properties through variables, the solution was result = lookup[val]. I initially got it wrong doing result = lookup.val. I know it…
0
votes
2 answers

How do I access a custom taxonomy created in Wordpress in Google Tag Manager?

I created a custom taxonomy in WordPress for article lengths. It's called 'Length' and these are the items within it: image I also created a custom dimension in Google Analytics (it's index 5), and created a custom Data Layer variable in Google Tag…
1
2