Experiments with graphs, json and xhr in js