dot_notation.js 422 B

123456789101112131415161718192021222324
  1. ({
  2. name: 'A Book',
  3. authors: ['John Power', 'Jamie Walsh'],
  4. price: {
  5. value: 200,
  6. vat: function () {
  7. return this.value * 0.2;
  8. },
  9. currency: {
  10. symbol: '$',
  11. name: 'USD'
  12. }
  13. },
  14. availability: {
  15. status: true,
  16. text: 'In Stock'
  17. },
  18. // And now, some truthy false values
  19. truthy: {
  20. zero: 0,
  21. notTrue: false
  22. },
  23. singletonList: [{singletonItem: 'singleton item'}]
  24. });