I have an object and need to combine it with an observable.
The object looks like this:
obj1
let org1Obj = {"category": "1", "testkey": "testvalue"}
The results with JSON.stringify of the observable looks like this:
obj2
[{"id":"51XXgI1w77VerovThbUV","question":"Sdad"},
{"id":"FxjDsyLBGqtrBx1EHFyM","question":"exanoke"}]
I then have an observable that fetches data and I'm thinking of using forkJoin to combine the two so I end up with the following result:
{"category": "1",
"testkey": "testvalue",
"questions": [
{"name": "test1"},
{"name": "test"}
]
}
How do I make org1Obj into an observable so I can use forkJoin on it and how can I add the second observable to "questions": [result from observable]?
map
. The way how exactly they should be combined remains unclear since the values of the result differ from original objects. – Estus Flaskmap
. – Estus Flask