Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by cowboysdude

  1. Yes that helps VERY much!! I just adjusted to my vars and bingo..... Well I guess I just learned something new...... and I REALLY appreciate that!!! Thank you so much!
  2. Well that's what I keep hearing LOL "That's easy..." Like I said I'm sure I'm overthinking this Here is what I've tried: var langFile = this.langFile; var keys = Object.keys(this.langFile); var langFile = this.langFile[keys]; and the standard for (var i=0; i<this.langFile.lang.length; i++) { var langFile = this.langFile.lang[i]; console.log(langFile.languages); } Plus so many other things that I've read on the internet that my head is ready to explode Like I said I'm kinda new to this so be gentle hahaahhha Thank you!
  3. I am new to JS but have been trying for three days reading everything and anything I could find...trying new things... I cannot figure out how to parse this in js... It is a valid json file ... it's an object with what looks like arrays in it.. ? Here is part of it... you'll get the idea... { "lang": [{ "code": 1000, "day": "Sunny", "night": "Clear", "icon": 113, "languages": [ { "lang_name": "Chinese Simplified", "lang_iso": "zh", "day_text": "晴天", "night_text": "晴朗" }, { "lang_name": "Finnish", "lang_iso": "fi", "day_text": "Aurinkoinen", "night_text": "Pilvetön" }, { "lang_name": "French", "lang_iso": "fr", "day_text": "Ensoleillé", "night_text": "Clair" }, { "lang_name": "German", "lang_iso": "de", "day_text": "Sonnig", "night_text": "Klar" },{ "lang_name": "Spanish", "lang_iso": "es", "day_text": "Soleado", "night_text": "Despejado" }, { "lang_name": "Swedish", "lang_iso": "sv", "day_text": "Soligt", "night_text": "Klart" }] }, { "code": 1003, "day": "Partly Cloudy", "night": "Partly Cloudy", "icon": 116, "languages": [{ "lang_name": "Chinese Simplified", "lang_iso": "zh", "day_text": "局部多云", "night_text": "局部多云" },{ "lang_name": "Finnish", "lang_iso": "fi", "day_text": "Puolipilvinen", "night_text": "Puolipilvinen" }, { "lang_name": "French", "lang_iso": "fr", "day_text": "Partiellement nuageux", "night_text": "Partiellement nuageux" }, { "lang_name": "German", "lang_iso": "de", "day_text": "leicht bewölkt", "night_text": "leicht bewölkt" }, { "lang_name": "Spanish", "lang_iso": "es", "day_text": "Parcialmente nublado", "night_text": "Parcialmente nublado" }, { "lang_name": "Swedish", "lang_iso": "sv", "day_text": "Växlande molnighet", "night_text": "Växlande molnighet" }] I cannot for the life of me figure out to parse this thing...what I'm after is getting the code ... then the lang_iso so I can show users [who have their language already set] the text in their language... I am probably making this wayyyyyyyyyyyyy too hard but honestly I have tried every loop... every function.... and I cannot get the data I am after.. Help please and Thank you.
  4. Thank you!! I can work with either one... yeah I haven't run across this and it was throwing me for a loop!!! Thank you for the help it put me right on track!!
  5. I am not sure why this just isn't coming to me but for some reason it's stumping how to properly parse this thing!! Every line has it's own entry and trying to get the info for each match is proving somewhat puzzling for me! I can get any of the info but how for instance can I get both teams together since each team has it's own line and each match has 2 lines in it.... I'm trying to pull the data then make a table out of it but for some reason it's just escaping me totally.... http://www03.myfantasyleague.com/2012/export?TYPE=nflSchedule&W=19 That is the xml file... $team1 = $games->attributes()->id; that is how I am getting it but it return both teams..... how can I do this line by line? Any suggestions would be helpful! Thanks!
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.