Skip to content

TS: How to get interface from a dynamically created object

I have a schema object that contains the typed property that starts empty. schema.typed will be filled dynamically when the application starts, example in another moment there is no pattern, really each time the application is started it will be a totally different and random structure. I would like to get an…

How to split text in javascript into paragraphs?

I have the following piece of text: “Hey is some text some text? You are some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text My name is some text some text some text some text some text

Create Quiz from Json tree structure

I am creating a quiz in JavaScript and jQuery. The json is having question and answers. The structure of json is like tree type structure. I have problem while accessing child nodes when user clicks on options. Here is the fiddle https://jsfiddle.net/281knp60/5/ The json looks like Here my code is: Answer You…

JavaScript merge arrays from two different functions

Hey I want to merge those two arrays and use it as one array. Assigning variables: Code to fetch data from Data Source 1: First function: Code to fetch data from Data Source 2: Second function: Merging arrays (didn’t work): I can’t put arrays outside these functions because i’m fetching data…