Posts

How to access JSON objects with spaces in Javascript

This is a tutorial on how to access JSON objects with spaces in Javascript. For example, let's say you want to access something like this: var test = {     "user data" : {         "Full name" : "John Doe " ,         "id" : "109"     },     "operating info" : {         "No. of interfaces" : "4"     } } And you need to know what's  user data , for example. Well, it's done like so: console. log (test[ "user data" ]); >  { Full name :   "John Doe" ,   id :   "109" } That wasn't that hard, was it? If you want to iterate over  test 's children, that's also possible: Object. keys (test). forEach ( function ( child ) {     console. log (test[ child ]); }); >   { Full name :   "John Doe" ,   id :   "109" } >   { No. of interfaces :   "4" } Maybe you want to know what's  Full name :  var data = test[ "user data"

Codepen's referrer screens are pretty broken

Image
Umm.. This popped up while I was messing around.

Made a Progressive Web App

I recently made a webapp  that displays live stock prices using an API . Well, I wanted to make it native, but the process of uploading an app to either App Store or Google Play is hell. But.. I just found a little dev platform ( Progressive Web Apps ) that apparently isn't that well known ... And apparently it works on both Android  and Apple. And here's the best part: I didn't have to rewrite the app at all..  Just a few tweaks & my HTML JS app was native like a real app. Check it out at investor.netlify.app ... Mobile recommended. (If you want to make your own, Google's Tutorials  are a great place to start).