$echo '{
< "items": [
< {
< "id": 1,
< "name": " Trail Backpack ",
< "price": "89.90",
< "stock": 12,
< "tags": [
< "outdoor",
< "bag"
< ],
< "seller": {
< "name": "Nordic Gear",
< "country": "NO"
< },
< "created": "2025-03-14T09:30:00Z"
< },
< {
< "id": 2,
< "name": "Camp Stove",
< "price": "$45.00",
< "stock": 0,
< "tags": [
< "outdoor",
< "cooking"
< ],
< "seller": {
< "name": "Fire & Co",
< "country": "US"
< },
< "created": "2025-01-02T10:00:00Z"
< },
< {
< "id": 3,
< "name": "Wool Socks 10-pack",
< "price": "24",
< "stock": 150,
< "tags": [],
< "seller": {
< "name": "Nordic Gear",
< "country": "NO"
< },
< "created": "2025-02-20T08:15:00Z"
< },
< {
< "id": 4,
< "name": "Headlamp 300",
< "price": "39.5",
< "stock": 8,
< "tags": [
< "light"
< ],
< "seller": {
< "name": "Fire & Co",
< "country": "US"
< },
< "created": "2024-11-30T17:45:00Z"
< },
< {
< "id": 5,
< "name": " Water Bottle 1L",
< "price": "12",
< "stock": 40,
< "tags": [
< "bottle",
< "steel"
< ],
< "seller": {
< "name": "Nordic Gear",
< "country": "NO"
< },
< "created": "2025-03-01T12:00:00Z"
< },
< {
< "id": 6,
< "name": "Rain Jacket",
< "price": "129",
< "stock": 5,
< "tags": [
< "clothing"
< ],
< "seller": {
< "name": "Alpine Ltd",
< "country": "CH"
< },
< "created": "2025-02-05T07:20:00Z"
< }
< ],
< "operations": [
< {
< "op": "flatten",
< "delimiter": "_",
< "arrays": "join"
< },
< {
< "op": "text",
< "fields": [
< "name"
< ],
< "action": "trim"
< },
< {
< "op": "cast",
< "types": {
< "price": "number"
< }
< },
< {
< "op": "rename",
< "mapping": {
< "seller_name": "seller",
< "seller_country": "country"
< }
< },
< {
< "op": "filter",
< "where": {
< "field": "stock",
< "op": "gt",
< "value": 0
< }
< },
< {
< "op": "add_column",
< "column": "price_with_tax",
< "expr": "round(price * 1.2, 2)"
< },
< {
< "op": "add_column",
< "column": "year",
< "expr": "date_part(created, '\''year'\'')"
< },
< {
< "op": "sort",
< "by": [
< "price:desc"
< ]
< },
< {
< "op": "select",
< "fields": [
< "id",
< "name",
< "price",
< "price_with_tax",
< "seller",
< "country",
< "tags",
< "year"
< ]
< }
< ],
< "exports": [
< "csv"
< ]
<}' |
<apify call data-done-right/dataset-transform --silent --output-dataset