Created
August 2, 2011 14:50
-
-
Save randallb/1120345 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for relation in relations | |
for key, value of relation | |
console.log "#{key}: #{value}" | |
if typeof value is "object" | |
for subkey, subvalue of value | |
console.log "inner: #{subkey}: #{subvalue}" | |
if subvalue is "newId" | |
console.log "I changed #{subkey} from #{subvalue} to #{id}." | |
value[subvalue] = id | |
console.log subvalue | |
console.log relations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment