The example you provide is using inline metadata (putting metadata inside the asset output) rather than writing to a stream. Your simplest solution is to use this form of command:
sendwithdatafrom <from-addr> <to-addr> '{"asset2":20}' '{"for":"<stream>", "key":"<whatever>", "data":{"json":{"key1":"value1","key2":"value2","key3":"value3"}}}'