this is the schema that I have now but I need to add more array as number 2, 3, 4 example: //post api Answer Just try to create a schema with an empty object like: Schema so you can add multiple elements. But your data completely depends on what you are sending in your API request.
Tag: javascript
How to use streams in Deno?
I am very confused on Deno documentation. It has ReadableStream and WritableStream API, but it doesn’t have a documentation to use it. I want to read from ReadableStream and write to WritableStream, how can I do that in Deno? Answer I want to read from ReadableStream and write to WritableStream, how can I do …
JAVASCRIPT DICTIONARY CREATION DYNAMICALLY
I am back-end developer , and i had to work with Frot-end a little ,but i am stuck in one problem.I am getting data from api and want my data to be stored in this way: Api call looks like this : So , i tried to use map and dict function like this to make dict like above ,but
How can I disable my click/drag selection box after one use?
I was wondering if anyone could help provide some input as to how I could disable the mousedown function after one instance of its use. The way I want it to work is so that it only works when enabled = true, and I change its value throughout the code in order to make it false by the end of
Unable to load certain images after Build in ReactJS (served with github)
I am trying to launch my website on github. After running npm run build, everything loads as expected when calling serve -s build. However when hosted on github, see website, I am unable to load the portfolio images. Strangely, I am able to access the files associated with each project. Here is my ReactJS: an…
How to merge a object to a array object in vuejs
I have a api response.data And my component .vue I want merge placeholder object to result after api response Answer Result is actually a list. You can use the destructuring assignment to prepend the placeholder. To use concat you must wrap the placeholder in a list. to achieve the same result in a “mor…
How can I make this javascript apply on every div returned by jinja
I have a Jinja tag that returns some database data. I added some javascript that works on some divs inside the for tag. The javascript code applies only on the first div. I am using fullPage.js in order to make full page scroll. How can I solve this? html: js: Here is the css for fullPage.js: I am a begginer
Passing Object from ASP.Net to javascript
I have an ASP.Net Core application. I have a Class with some attributes: and in PageModel of Index.cshtml, I am creating on object of that class and setting it is a property: Now, in my Index.cshtml, I have some default html and then I add a script like this: <script type=”module” src=”~/…
How to filer an array of objects and return only one object based on a specific value
I have an array containing two plan objects: What I am trying to do is use a value (customerPlanId) to find the correct plan by matching it to the plan.id and then just return the correct plan, like below: I know I can map through the plans and filter for the correct plan, but then how can I return the
Mounting a Components Library in Vue 3
I am new to Vue.js and trying to migrate a Vue.js 2 migration to Vue.js 3. I have read the Vue.js instructions on how to that carefully; however, the application that I need to migrate contains a Component Library out of Vue.js 2 components that I need to mount in the migrated app aswell. This is the Vue.js 2…