All Questions
18,462
questions
-1
votes
0
answers
20
views
Output an object's value without looping [duplicate]
I'm trying to var_dump the guid value in this object without setting up a foreach loop. I think the ["2"] key is throwing me off. This data is coming from the Toast API. Any help would be ...
0
votes
0
answers
26
views
How do get search filter data in es6
// Filter rows based on string values and exclude from whiteList
const whiteList = rows.map(sel => sel.RuleAutoID); // Array of IDs to exclude
console.log('whiteList', whiteList);
// Assuming you'...
3
votes
2
answers
61
views
Traverse over tree type structured data uing JavaScript
I have a data set having parent and nested children in it. The purpose of this data is to traverse over parent to -> child1 to-> Child1Child .....
-> child2 to -> child1 to -> child2 ...
-1
votes
0
answers
20
views
understanding json_decode data [duplicate]
When I use json_decode and look at the results, I get a list of objects and arrays. I specifically want to retrieve one piece of information, but I'm not sure how to get it. I seem to have a stdClass ...
0
votes
0
answers
76
views
Using arrays from different classes in java
I am making a TicTacToe game. The idea is I print a 3x3 grid with numbers from 1-9 and when a player selects a number it changes that element in the grid array with a character like * or o
I'm facing ...
0
votes
1
answer
14
views
i want to create a modal, when i click on button having id a modal should be opened having card
i have created a courses page and create a fullscreen which should be opened when button is clicked modal is also opened but i am having an error in JS.
let value = colc[details.target.id]
if(details....
-1
votes
1
answer
51
views
Javascript : Find node value through recursive iteration
I have the following structure :
var content = {
"id": "RkktMTA1OC0wNTE3QElNQi82NTAwNC9YLzAwSDc",
"name": "FI-1058-0517",
"category": &...
0
votes
0
answers
14
views
GroupBy a nested array of objects in TS
I have an object MealFood which contains information about a food like this:
{
...
id: 1,
main: true,
familyId: 3,
scheduledServings: [
{
...
time: '2024-07-09 13:00:00',
quantity: ...
-2
votes
2
answers
53
views
How can I get last three values from array of objects [closed]
I have an array of object with a few values. I would like to get only last, three values (ownerSurname, color and bark).
I tried to use slice or length but with failure.
const myValues: MyValues<...
-1
votes
0
answers
19
views
AsyncStorage React Native how can i store an object with multiple arrays inside?
i have been using asyncstore these days in react native and it works okay when storing tokens and simple objects. But i has a model like this (an object with arrays inside)
"_id": {
&...
0
votes
1
answer
44
views
Filter the property of an array of object in a Datatable Column
I'm new to Primevue, Here is my example:
User object:
User {
username: 'test',
email: '[email protected]',
id: 1,
role: {
id: 1,
name: 'Admin',
description: ...
-1
votes
2
answers
44
views
keep getting TypeError: array.push is not a function when trying to push an object into an existing array with objects
I'm learning about localStorage and I'm trying to build a basic shopping cart function. The process is:
user clicks on "Add To Cart" button.
If localStorage("shoppingCart") doesn'...
-3
votes
0
answers
95
views
Returning a string vs returning an array in java [duplicate]
Consider below two code snippets showing java functions
Snip 1:
public String greet() {
return "hello";
}
Snip 2:
public String[] greetings() {
return new String[]{"hello", ...
-3
votes
1
answer
64
views
Javascript Object Array, Iterate over only one object
I have a javascript array object. I want to find the result of a single array. The following code does what I want but always iterates over the whole array. How can I achieve the same on just one ...
2
votes
2
answers
119
views
Is there a way to search an array of arrays for matching properties and if they match, make sure they aren't in adjacent positions?
I have been wracking my brain for a week on this problem and would appreciate any help or suggestions. I have a form that collects the users first name, last name and song. It stores those values in ...