Use array from txt file and scan for matching div id's?

Use array from txt file and scan for matching div id's?

Not sure if this is possible with Jquery, but can you load an array from a txt file - eg 1,34,89,45

Then use this array to change the html contained within a corresponding div id

  1. <div id="1"><a href="#asdfiuhasdfoih">Text 1</a></div>
  2. <div id="2"><a href="#asdfi">Text 1</a></div>
  3. <div id="45"><a href="#asdfiuhasd">Text 1</a></div>
  4. <div id="5"><a href="#fiuhasdfdf">Text 1</a></div>
  5. <div id="34"><a href="#dfiu">Text 1</a></div>
The bold line ids match the txt file, so I would change the html inside them:

  1. <div id="1"><p>Replacement</p></div>
  2. <div id="2"><a href="#asdfi">Text 1</a></div>
  3. <div id="45"><p>Replacement</p></div>
  4. <div id="5"><a href="#fiuhasdfdf">Text 1</a></div>
  5. <div id="34"><p>Replacement</p></div>
I know i can replace the html, but I am struggling to find a good tutorial on the loading the txt file and using the results to scan each element.... which is why I was wondering if this is possible :)