Skip to content

dankleiman/path_finder

Repository files navigation

Find Any Value in a Compound Data Structure

Given a value and a compound data structure, returns the position in the strucure, formatted so you can referrence it in your code.

How to use this tool:

  • To find a single, unique value, run the program from "path_finder.rb"
  • To display multiple paths for a value, run the program from "craigs_path_finder.rb"
  • There is no UI, yet.
  • Update "favorite_movies" on line 71 with your data structure
  • Update the parameters for "raw_path = pathfinder(THE VALUE YOU WANT TO FIND, YOUR DATA STRUCTURE)"

Later versions will hopefully include:

  • An interface that allows you to enter the value when you run the program.
  • Support for CSV file access to a data set.
  • a gem you can include in your rails project

Questions and feedback welcome!

Thanks.

About

Return path for any piece of data in a complex structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages