Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5da00b5

Browse files
authored
Remove the sort by length feature
I did this by hand. I decided it would usually just be confusing.
1 parent ac80842 commit 5da00b5

File tree

1 file changed

+2
-5
lines changed
  • json-string-extractor.html

1 file changed

+2
-5
lines changed

json-string-extractor.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<body>
154154
<div class="container">
155155
<h1>JSON string extractorh1>
156-
<p style="margin: 0 0 20px 0; font-size: 14px; color: #666; line-height: 1.2;">Paste JSON below to extract all strings that are longer than 20 characters or contain newlines. Results are sorted by length and displayed as copyable textareas.p>
156+
<p style="margin: 0 0 20px 0; font-size: 14px; color: #666; line-height: 1.2;">Paste JSON below to extract all strings that are longer than 20 characters or contain newlines.p>
157157

158158
<div class="input-section">
159159
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
@@ -269,12 +269,9 @@

JSON string extractor

269269
return;
270270
}
271271

272-
// Sort strings by length (longest first)
273-
const sortedStrings = [...strings].sort((a, b) => b.value.length - a.value.length);
274-
275272
let html = `

Found ${strings.length} string${strings.length === 1 ? '' : 's'}:

`
;
276273

277-
sortedStrings.forEach((item, index) => {
274+
strings.forEach((item, index) => {
278275
const escapedValue = item.value
279276
.replace(/&/g, '&')
280277
.replace(/</g, '<')

0 commit comments

Comments
(0)