Search Yaml Entries By Value

Discussion in 'Plugin Development' started by Croug, Jun 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Croug

    I have a yaml file that looks something like this:
    Code:
    Blocks:
      block1: -1
      block2: 20
      block3: 45
      block4: -1
      block5: -1
    how to I get a hashmap of all the children of 'Blocks' omitting the '-1' entries. Thanks!

    -Jordan 'Croug'
     
  2. Offline

    caseif

    There's no way to do this other than to iterate the keys and pick out the entries you want to keep.
     
  3. Offline

    Croug

    Thats what I thought, thanks for the response!
     
Thread Status:
Not open for further replies.

Share This Page