• Post Reply Bookmark Topic Watch Topic
  • New Topic

Normalise hash table.  RSS feed

 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone please tell me a better way to change the following hash table



into



Any sample code is very much appreciated.
Thanks
Ss
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to parse the values for those template holders (you can use a regex), then replace them with the values of those keys. This has to be done recursively because of your example of val1. You also need to be aware of cycles; what if the value of val2 is ${b}? b and val2 now refer to each other. These cycles can even contain several steps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!