Interactive Mode
Explore JSON interactively with fuzzy search and expression building.
Opening Interactive Mode
Open a file without an expression to enter interactive mode.
1ls readFile data.jsonWorks with all supported formats.
1ls readFile config.yaml
1ls readFile config.tomlMode 1: Path Explorer
Navigate and search JSON paths.
- Fuzzy search: Type to filter paths
- Live preview: See values as you navigate
- Type information: Shows String, Number, Array, Object, Boolean, or null
Smart Tooltips
As you type expressions, 1ls provides intelligent assistance:
Method Hints
When you type a . followed by characters, matching method signatures appear:
Search: .fil
Method hints:
› .filter(x => ...) - Filter by condition
.find(x => ...) - Find first match
.findIndex(x => ...) - Find first match index- Fuzzy matching: Type partial names to find methods
- Type-aware: Shows methods relevant to your data type (Array, String, Object, Number)
- Builtin tags: Custom 1ls methods are marked with
[builtin]
Live Result Preview
After completing a method expression, see the evaluated result instantly:
Search: .filter(x => x > 2)
Result:
[3, 4, 5]This helps you verify your expression works before executing it.
Mode 2: Expression Builder
Build complex expressions with guided method selection.
- Navigate to a path in Explorer mode → Press Tab
- Type to fuzzy search methods → → to accept
- Type to fuzzy search properties → → to complete
- Repeat to chain methods
- Press Enter to execute
Example Session
1. Navigate to .users (Array) → Tab
2. Type "fil" → → (accepts .filter(x => ...))
3. Type "act" → → (completes with x.active)
4. Type "map" → → (accepts .map(x => ...))
5. Type "name" → → (completes with x.name)
6. Enter → executes: .users.filter(x => x.active).map(x => x.name)Keyboard Shortcuts
| Key | Action |
|---|---|
| ↑/↓ | Navigate methods/properties |
| → or Tab | Accept/complete method or property |
| ← | Undo last segment |
| Enter | Execute expression |
| Esc | Go back to Explorer / Quit |
| q | Quit (from Explorer) |
Available Methods by Type
Array
map, filter, reduce, find, findIndex, some, every, sort, reverse, slice, concat, join, flat, flatMap, length
String
toUpperCase, toLowerCase, trim, trimStart, trimEnd, split, replace, replaceAll, substring, slice, startsWith, endsWith, includes, match, length
Object
{keys}, {values}, {entries}, {length}
Number
toFixed, toString