HTMLDialog Fill inputbox from csv data

Right on, I have the files working!

I used the sample here to write the json file: Read .json file

require 'json'

box_Info = Hash[
	"nam", nm ,
	"id1", width,
	"id2", length,
	"id3", depth
].to_json

	File.write("C:/MySketchupDialog/#{nm}/testMyJS.json", box_Info)

	}

I can populate the tags with js, so far by hard coding the json data.

function fill_input_tags() {

  var data= [{"nam":"dave m","id1":224.0,"id2":234.0,"id3":44.0}];

  Object.keys(data[0]).map(value => {
    document.getElementById(value.replace(/ /g, "")).value = data[0][value]
});

How do I select a .json file to populate the input tags?