Comments (1)
Some suggestions for content on that page:
Add _search as a sequence keyword with description like:
- "_search" Searches for any containers which match all the given matching conditions, and merges the provided updates to all matching containers.
Add subheadings under Mirroring Structure heading to make it clearer to identify what each codeblock is for, e.g.
- Sample input file
- Merging changes to a sequence by index number
- Merging changes to a sequence by search terms
- Appending to a sequence
- Replacing a sequence
- Deleting a key
Under the new subheading regarding search terms, content such as:
Merging changes to a sequence by search terms
As an alternative to explicitly specifying the list index to update a container at, you can also search for containers which match a set of conditions. This search feature will merge your replacement values to all containers in the list which match all your search terms.
The format of using this search is as follows:
Sequence = [
"_search", [
{ TargetKey = "target_value" }
{ TargetKey = "replacement_value" }
...
]
]
The keys for both the target_value and replacement_value can be the same or different. The target_value and replacement_value containers may also both contain multiple key-value pairs, e.g.
Sequence = [
"_search", [
{
Name = "WeaponThrow"
FullyAutomatic = true
}
{
FullyAutomatic = false
Control = "Attack2"
MinChargeToFire = 1.0
LoseControlOnRelease = true
SwapOnFire = "_delete"
}
]
]
To perform multiple searches at the same level, add further pairs of match conditions and replacement values, e.g.
Sequence = [
"_search", [
{ TargetKey = "target_value" }
{ TargetKey = "replacement_value" }
{ OtherTargetKey = "another_target_value" }
{ OtherTargetReplacement = "another_replacement_value" }
]
]
To make the same change as the previous example where a container was updated using an explicit index number, to change the value at MyKey to "newvalue", this is the corresponding merge sjson which identifies the container to update by finding containers where OtherKey = 45
{
Sequence = [
"_search"
[
{ OtherKey = 45 }
{ MyKey = "newvalue" }
]
]
}
from sgg-mod-format.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sgg-mod-format.