Find index where MarketName has certain value

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
kiely
Voice
Posts: 1
Joined: Wed Jun 11, 2014 1:18 pm
Contact:

Find index where MarketName has certain value

Post by kiely »

https://github.com/kitaco/coinprice/blo ... nprice.tcl

I have this API
( https://bittrex.com/api/v1/public/getmarketsummaries ) where the index of the values I am trying to get, keeps changing.

I have

Code: Select all

set cloaklast [dict get [lindex [dict get $bittrex result] 28] Last]
right now, and the 28 keeps changing.

I need to find the list value of MarketName: "BTC-CLOAK" (or any other value of MarketName) and put it in a variable to use so the index value is always kept up to date.

I think I need foreach or lsearch. I am unsure.

Thanks!
Post Reply