Jump to content

Mishmashek

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Mishmashek

  • Rank
    Newbie
  1. function loadDoc(n_file) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var myObj = JSON.parse(this.responseText); var parametr = "september" var neco = myObj.september.17[0].dayname; var neco2 = "myObj." + parametr + ".17[0].dayname"; debugger; x = zacinajiciDen(neco); than i have this in my variables: neco1: "pa" neco2: "myObj.september17[0].dayname" i would like to have value "pa" inside like in neco1 but i would like to be able to change name of month. Is it possible Hi all, I have a simple problem. I would like to have a value of Object "myObj.september17[0].dayname" in my variable neco2. but there is of course more month which i need access and i need to changing this variable but when i use "myObj." + parametr + "17[0].dayname"; it is saved a string to variable instead of value. I am very new in JS, learning two days now so please be patient with me.
×