updated getSequenceJson to handle nestedCommands in general