RecordPath Playground

draft spec
{#if record || editing || jsonError}
Record
{ e.preventDefault(); loadUri(); }} >
{#if loadError} {loadError} {/if} |
{/if} {#if editing || jsonError} {#if jsonError}
{jsonError}
{/if} {:else if record} (pathInput = p)} onLoadUri={(uri) => loadUri(uri)} /> {:else}
{/if}
{#if parseError}
{pathInput.trim()}
{' '.repeat(parseError.position)}^ {parseError.message.split(' (position')[0]}{#if parseError.suggestion}
hint: {parseError.suggestionHint}: {/if}
{/if}
Available paths {#if paths.length > 0} ({paths.length}) {/if}
{#each paths as { path, type }} {/each} {#if paths.length === 0 && !jsonError}
Paste a JSON record to see available paths
{/if}
{#if hasInput}
Matches ({matches.length})
{#if matches.length === 0}
No matches
{:else} {#each matches as val}
{formatValue(val)}
{/each} {/if}
{/if}