Questions tagged [jsobject]

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

101 questions
0
votes
1 answer

No Null Column array

I've an array like below [ { "Axis": "Profile", "P1": 12, "P2": "", "P3": "", "P4": "", "P5": "", "P6": "", "P7": "", "P8": "", "P9": "", "P10": "", …
0
votes
0 answers

Function addDoc() called with invalid data. Unsupported field value: undefined, when an object is passed. React Js

I want to send an "object" in firestore. const handleSubmit = () => { console.log(typeof(basketArray)) addDoc(orderCollectionRef, { name: newName, email: newEmail, phone: newPhone, home: newHome, pinCode: newPinCode, …
0
votes
0 answers

Javascript - How reduce unwanted if check in Mapping

In mapper object. I have map2 property map2 format is changed compared to others it has inner object. Due to that I put if block in my for loop to map inner object. But I feel its bad thing. If in future I add another property in mapper with nested…
kishoreraj
  • 25
  • 4
0
votes
1 answer

Can there be a multiline key/value in json?

Is somethhing like this possible in json let a = { "awe sdsds" : "eweq dfs ewewew" } can i have multiline strings as key and value I tried and got ↵ this icon at newline for key and \n this at newline for…
0
votes
2 answers

Can i create new object by define new keyword from object literal?

I have created an object by defining the 'new' keyword from the object literal. But the problem is I can't access that object without looping. so is there any way to access that object? const animal = { animalDetails: function(a, b) { this.a…
0
votes
1 answer

Javascript: How to print object line by line?

In my React Native app I'm displaying modals that contain a printout of an object. I use the Alert.alert() method, which you need to pass a string to. Since I have an object I want to print, I pass JSON.stringify(obj) to the method. However, this…
gkeenley
  • 6,088
  • 8
  • 54
  • 129
0
votes
1 answer

Performing loop on js objects and then use map method instead of calling component again and again

Need help in React…I converted the complex xml file into js object format. After converting the xml file, the js object are stored in ress variable that is showing in the picture. We are storing the different partial transcript in different…
0
votes
2 answers

Angular GET returns Object instead of Array

In consuming a REST API with Angular, my GET request returns an object. I wish to have an array so that I can slice and display the contents with property binding. I feel the solution involves 'map' function but previous attempts resulted in a…
ajf0
  • 13
  • 5
0
votes
1 answer

How can i convert a javascript dynamic array to an array of multiple objects with custom key names

I have two fields in my table (name, role). I created a form where i can add and remove input fields dynamically using add and remove buttons using jquery. so the array i am creating is not a fixed width array. I am using map method to extract…
0
votes
1 answer

Gets undefined when trying to access a null value inside a nested object in vue js

I have an object const data={a:'value1',b:{c:'null'}} Now when I try to access 'c', I get 'undefined' but I am getting 'b'. I tried accessing like this: console.log(data.b) returns {c:'null'} but console.log(data.b.c) returns undefined
0
votes
4 answers

mapping two arrays of equivalent length by object attributes javascript

I have two arrays: Array 1: [ { name: 'Bob', traits: { id: 1 } }, { name: 'Karl', traits: { id: 2 } }, { name: 'Joseph', traits: { id: 3 …
Juliette
  • 4,309
  • 2
  • 14
  • 31
0
votes
1 answer

Flutter: JsObject call document.getElementById

How we can call getElementById using JsObject in flutter, tried below but not worked import 'dart:js' as js; var msg = js.context['window'].callMethod( 'document.getElementById', ["feeds"]); var msg = js.context.callMethod( …
0
votes
2 answers

(Bug) fetched object from server returns undefined

There is a lot of code involved in this process, so I will explain the best way possible to narrow down the problem. First, the user signs up and sends an object with other nested objects and arrays to the middleware. The…
user14930609
0
votes
1 answer

Redundant code for objects name-values in JavaScript

I defined a js object whose name-value pairs are function expressions with more or less same function definition. The key names of the object match the functions of the module imported from outside. const myModule = require('some_module'); //some…
aman-aman
  • 152
  • 1
  • 9
0
votes
2 answers

JavaScript Classes: Accessing method from within an Object's function property

I was wondering if it was possible if anyone knew a solution to the problem I am having. Let's say we have the following JavaScript class: class foo { // Class Method. makeNoise() { console.log("bar"); } // Class Object …