generalise dump.js
write a parser 0d structures