0

I am learning Firebase + AngularFire2.

My DB in firebase is like .

enter image description here

Whe I try to get child of courses > ncjkdhjjd8ejd. by using

let ll = (_angularFire.list("courses/ncjkdhjjd8ejd"));

ll.subscribe(
  (val) => console.log(val)
)

I am getting :

enter image description here

How can I get it in a single json object, not 3 arrays.

I only want values in json structure.

1 Answer 1

2

Use an AngularFire2 object observable instead:

let course = _angularFire.object("courses/ncjkdhjjd8ejd");
course.subscribe(val => console.log(val));
Sign up to request clarification or add additional context in comments.

1 Comment

Superb. Thanks a lot sir.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.