Category "javascript"

How to filter an array data based on another array value?

I have array data like these. const dataSample = [ { "staff": 1000, "name": "Apple", "logo_url": "biten apple", "down":"yes" },

does the filter with new date() accept format other than yyyy-mm-dd?

I have a response from mydatepicker in the following format { "isRange":false, "singleDate":{ "date":{ "year":2022, "month":5, "day":13 },

Compare object structure

I have an object like this: const obj = { name: "one", created: "2022-05-05T00:00:00.0Z", something: { here: "yes" }

two nested v-for loops of which the inner one shouldn’t display its element but is needed for getting class attributes

how would we solve having two nested v-for loops (elements), of which one is solely for getting class attributes and shouldn't display its div element? because

Component memoized with React.memo() keeps re-rendering

I have a ParentComponent looking like this: const ParentComponent = () => { [product, setProduct] = useState({ name: "Test", description: "Informat

How integrate Smartsupp chat to a React Site (Gatsby)

I want to integrate the smartsupp chat in my Gatsby site (React), but the site only give you the following code... For a better performance would add some 5sec

Error: Typing on the input field of pick for each row just duplicates whatever value was entered in the qty field

So I have this field where you can enter the quantity for each row. It was working, however, when I added another input field for the pick, it will just duplica

Active nav item with custom html elements

I'm building a nav component using html custom elements like so: HTML <app-navbar></app-navbar> <template> <style> ul { disp

Material-UI DataGrid, display sum of column and sum updates according to filter as well

I have this Material-UI DataGrid, how can I sum all of the values for the column Total Amount in which this will also be updated once filter is triggerd as well

How to animate a svg path such that another different colored path slowly starts filling it?

I have an SVG that kind of looks like a race track encoded in the form of a <path> element. What i want is to animate another path with a different color

Slider in Apple store style

I know I would show some effort in this but I have no idea... I'm trying to make a slider like the one in the store section of Apple website. https://www.apple

How do I for check condition in filter iterating on list and checking for multiple condition which are present in array?

I have authors which can change vary in numbers in list (string array). I have to filter check for each author whether that match to author present in annotatio

Is there a way to set the timestamp to UTC in discord.js

I wanted to create a footer for a discord embed, that has UTC time so I created the lines in the following, and then it errored a lot, so I turned it into an ob

I can't figure out why I'm getting a ReferenceError: fileUploaded is not defined

Hi this is my first post! Here's the error I'm throwing when trying to submit a post on a website I'm making! This is the error and line 36 is where i call shar

Can I create multiple elements of the same type using Strapi and GraphQL?

Can I create multiple elements of the same type using Strapi and GraphQL? For example - createMultipleFoo mutation(data: [ nameOfFoo: "ooaoaoa", weightO

Is there a way to cast a string of only hh:mm to Date in Javascript

I have a business hours object in a mongoose schema that represent a date. I'm passing a json object and retrieving the to parse to Date as string. I wonder if

Retain the selection in previous page when moved to next in ExtJS Combo box

I have the ExtJs form combo which shows the values in the dropdown as checkbox and the value to select. I have used the pagination to list all the values with n

How do HTML DOM properties works?

Is document.InnerText a variable? If not then why it has assignment operator like this code below: document.InnerText=count I tried to reverse the count and do

jquery 3.6.0 animate width to specific size not working

I have this jsfiddle: $('.btn').click(function() { if ($('nav').hasClass('open')) { $('nav').removeClass('open'); $('.hide').animate({ width: '5

Create protobuf with json values

is it possible to merge or set protobuf message values with matching json values??? example json: {id: 1, channel: 2, userIsLogged:true} and a proto definition