Variable as command not working?

Variable as command not working?

Hi I bet this is simple for most but it's just killing me and cant figure it out...

This is not working...
  1. var append = "append";
  2. $("#table").eval(append)( $( item.row ) );

Neither does this...

  1. $("#table").window["append"]( $( item.row ) );

This is working...

  1. someVariable = 'alert';
  2. window[someVariable]('Foo!');


How can I make the first one work? I need to pass eigher append or prepend to the command.