Slicelytics monogram

Filter JSON, CSV and Log Data in Your Browser

Cut a large JSON, CSV or NDJSON file down to the parts you need. Show only the relevant fields, pick rows by index, keep the first few elements of an array, or match and exclude values. This page lists every filter available, with a demo to try them on.

Try Every Filter on a Sample Log

id
level
status
durationMs
chevron_right
request
chevron_right
user
tags
chevron_right
spans
chevron_right
error
12 items

The demo holds a log of 12 API requests. Click Filters above the data, or press ⌘P on a Mac or Ctrl+P on Windows and Linux, then type any example from this page and press Enter.

One Input for Every Filter

Everything is typed in the Filters input, in Explore, Compare and Visualize alike. Press Enter to apply what you typed. Each filter then shows as a chip under the input: click its × to remove it, or Reset filters to remove them all at once.

  • Several at once: separate filters with commas, e.g. level="error", [0-5]. Commas inside brackets and quotes belong to the filter, so [1,5,10] is one filter.
  • Autocomplete: property names, their nested properties, = and brackets are suggested as you type. Press Tab to accept the suggestion, or pick one with the arrow keys and Enter.
  • Keyboard: ⌘P on a Mac, Ctrl+P elsewhere, focuses the input from anywhere on the page; Esc closes the panel.
  • The whole file: filters apply to every item in the dataset, not only to the ones on screen, and to large files while they are still loading.

Show Only, Then Toggle

Properties, items and array elements follow one rule. While nothing of that kind is filtered, typing one shows only it. Once something is filtered, typing another toggles it: it is added if it was hidden, and hidden if it was shown. Try it in the demo: type level, and only the level of each request is shown. Type status, and the status is shown next to it. Type level again, and only the status is left.

Properties

TypeWhat it does
level Shows only the level property, or toggles it once others are filtered.
request.pathA nested property: its path, joined with dots.
userAn object property, with everything in it.

The property list under the input has a checkbox for every property, nested ones included; clicking one toggles it, whatever else is filtered.

Items by Index

An item is one element of the dataset: one line of an NDJSON file, one row of a CSV or TSV file, one element of a JSON or TOON array. Type indexes in brackets to pick items by their position. The first item is [0].

TypeWhat it does
[3]Shows only the fourth item.
[0-4]A range, both ends included: the first five items.
[1,5,10]A list of indexes. Lists and ranges mix: [0-2,7,9-11].
[1], [5], [10]The same as [1,5,10], typed as three filters.
[]Shows all items again.

Once some items are picked, typing more toggles them: after [0-4], [2,8] hides the third item and adds the ninth. If a toggle leaves no item shown, all of them are shown again. A range can span millions of items, and in a large file, the items left out are skipped rather than read.

Hide Items

TypeWhat it does
![3]Hides the fourth item, and keeps showing the rest.
![5-9,11]Hides several, with the same lists and ranges as above.

A ! always hides, whatever is shown, so [0-9] then ![3] shows the first ten items but the fourth. Hiding every item is allowed: an "all items hidden" chip stays, and removing it shows them again.

Array Elements by Index

Brackets after a property pick elements of the array in it, in every item. They take the same indexes, lists and ranges as items do.

TypeWhat it does
tags[0]Shows only the first tag of each request.
tags[0-2]The first three tags. Lists work too: tags[0,3].
spans[1]Arrays of objects too: the second span of each request.
tags[]Drops the index filters on tags, showing all its elements again.

Typed again for the same array, indexes toggle: after tags[0-2], tags[1] leaves the first and third. The elements kept stay at their indexes, so tags[2] still reads as the third tag. If the property was hidden, an index filter shows it.

Values

A filter with = keeps only the items with that value; with !=, the items without it.

TypeWhat it does
level="error"Keeps the items whose level is error.
status=500Quotes are optional, and numbers are matched as text.
request.method="POST"A nested property.
tags="retry" Keeps the items with a retry tag. In arrays, any element can match, and only the matching ones stay shown.
spans.name="db" The same for arrays of objects: the requests with a db span, showing only that span.
level!="debug" Keeps every item whose level isn't debug, items without a level included.
level!="debug", level!="trace"Exclusions on the same property add up: the items with neither.
user.plan!="free" Keeps the requests without a user too: a missing or null value matches no =, and every !=.
level=No value: drops the value filters on level.

Values match exactly, letter case included: level="Error" finds nothing in the demo. A new = filter on a property replaces the one before it, so level="error" then level="warn" keeps the warnings. A value filter doesn't need its property to be shown.

Combining Filters

Filters of different kinds apply together. For example, [0-5], level!="info", request, status keeps those of the first six requests that aren't info lines, and shows only their request and status. Items keep their indexes from the file whatever is filtered, so [3] is always the fourth item of the dataset, not the fourth one left.

Filters in Links and Agent Views

When you share a view, the link carries only what your filters leave. An AI agent, or a script, sets the same filters in the ViewSpec of the link it builds:

{
  "v": 1,
  "items": "0-99,205",
  "props": ["level", "request.path", "tags[0-2]"],
  "filters": { "status": "500", "level": { "not": ["debug", "trace"] } }
}

items picks items, props the properties shown, array indexes included, and filters the values, with not for exclusions.

Common Questions

Do indexes start at 0 or 1?

At 0, for items and array elements alike: [0] is the first.

Why are brackets ignored in my dataset?

A dataset of a single object, or a single item, has no items to pick. Brackets after one of its array properties, e.g. results[0-9], still pick array elements.