English subtitles

← JSON - JavaScript Basics

Get Embed Code
5 Languages

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. Okay. So how do you want to cover nested information?
  2. >> I mean, it's not too tricky.
  3. You know what?
  4. Let's use object literal notation here.
  5. You could accomplish the same thing using dot or bracket notation.
  6. But, I want to show the students a really useful tool for making sure your
  7. data are formatted properly which relies on object literal notation.
  8. >> So you mean JSON?
  9. >> Yep.
  10. JavaScript Object Notation.
  11. Hey James?
  12. You had two majors, right?
  13. Let's make it a JSON object that shows nested data.
  14. Okay.
  15. So, I'm seeing one big object with one property called schools.
  16. In schools is a list of two objects, we know it's a list because we
  17. have these square brackets here, indicating it's an array.
  18. The first object has the name Eckerd College, City of St. Pete and so on.
  19. The second object has a name of Nova Southeastern.
  20. In the city of Fort Lauderdale.
  21. This looks like a good JSON to me.
  22. Mind if we check it?
  23. >> Not at all.